Skip to content

Commit 391011a

Browse files
authored
Merge pull request #158 from silinternational/feature/add-TabBar-namespace-to-types
fix(types): Add Scroller and Tab to TabBar type
2 parents bcc25f2 + dd08278 commit 391011a

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

index.d.ts

+19-3
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,13 @@ declare module '@silintl/ui-components' {
107107
title?: string
108108
subtitle?: string
109109
menuItems?: {
110-
icon: string, label: string, url: string, urlPattern: string, hide: boolean, button: boolean, tooltip: string
110+
icon: string
111+
label: string
112+
url: string
113+
urlPattern: string
114+
hide: boolean
115+
button: boolean
116+
tooltip: string
111117
}[]
112118
dismissible?: boolean
113119
hasTopAppBar?: boolean
@@ -184,7 +190,7 @@ declare module '@silintl/ui-components' {
184190
}
185191

186192
interface SelectProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap['div']> {
187-
options?: { name: string, id: number }[]
193+
options?: { name: string; id: number }[]
188194
width?: string
189195
disabled?: boolean
190196
selectedID?: string
@@ -208,6 +214,16 @@ declare module '@silintl/ui-components' {
208214
}
209215
export class TabBar extends SvelteComponentTyped<TabBarProps> {}
210216

217+
export namespace TabBar {
218+
export class Scroller extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap['div']> {}
219+
220+
interface TabProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap['div']> {
221+
active?: boolean
222+
label?: string
223+
}
224+
export class Tab extends SvelteComponentTyped<TabProps> {}
225+
}
226+
211227
interface TextAreaProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap['div']> {
212228
label?: string
213229
value?: string
@@ -269,7 +285,7 @@ declare module '@silintl/ui-components' {
269285
title?: string
270286
icon?: string
271287
disabled?: boolean
272-
buttons?: { label: string, url: string }[]
288+
buttons?: { label: string; url: string }[]
273289
footerText?: string
274290
}
275291
export class CustomCard extends SvelteComponentTyped<CustomCardProps> {}

0 commit comments

Comments
 (0)