Class: BlazeTabBar
ui/tabBar.BlazeTabBar
Hierarchy
โณ
BlazeTabBar
Constructors
constructor
โข new BlazeTabBar(...tabs)
Creates an BlazeTabBar component.
Parameters
| Name | Type | Description |
|---|---|---|
...tabs | string[] | The tab titles |
Overrides
Defined in
src/ui/tabBar.ts:23
Properties
activeCb
โข activeCb: (tab: string) => void
Type declaration
โธ (tab): void
Function that is called when activeTab changes.
Parameters
| Name | Type |
|---|---|
tab | string |
Returns
void
Defined in
src/ui/tabBar.ts:16
activeTab
โข Private activeTab: string
Defined in
src/ui/tabBar.ts:11
element
โข Readonly element: HTMLDivElement
Inherited from
Defined in
src/ui/element.ts:9
keys
โข Readonly keys: KeyboardHandler
Inherited from
Defined in
src/ui/element.ts:11
mouse
โข Readonly mouse: MouseHandler
Inherited from
Defined in
src/ui/element.ts:10
tabElements
โข tabElements: BlazeElement<HTMLParagraphElement>[] = []
Defined in
src/ui/tabBar.ts:9
tabs
โข tabs: string[]
Defined in
src/ui/tabBar.ts:8
text
โข text: HTMLParagraphElement
Inherited from
Defined in
src/ui/titleBar.ts:6
touch
โข Readonly touch: TouchHandler
Inherited from
Defined in
src/ui/element.ts:12
Methods
createTabElements
โธ createTabElements(): void
Creates and adds the tab elements to the bar.
Returns
void
Defined in
src/ui/tabBar.ts:36
markActive
โธ markActive(tab, fireCallback?): void
Adds the active class to the element for the given tab id.
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
tab | string | undefined | The id of the tab to mark |
fireCallback | boolean | true | wether or not to call activeCb |
Returns
void
Defined in
src/ui/tabBar.ts:59