Skip to main content

Class: BlazeTabBar

ui/tabBar.BlazeTabBar

Hierarchy

Constructors

constructor

โ€ข new BlazeTabBar(...tabs)

Creates an BlazeTabBar component.

Parameters

NameTypeDescription
...tabsstring[]The tab titles

Overrides

BlazeTitleBar.constructor

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
NameType
tabstring
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

BlazeTitleBar.element

Defined in

src/ui/element.ts:9


keys

โ€ข Readonly keys: KeyboardHandler

Inherited from

BlazeTitleBar.keys

Defined in

src/ui/element.ts:11


mouse

โ€ข Readonly mouse: MouseHandler

Inherited from

BlazeTitleBar.mouse

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

BlazeTitleBar.text

Defined in

src/ui/titleBar.ts:6


touch

โ€ข Readonly touch: TouchHandler

Inherited from

BlazeTitleBar.touch

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

NameTypeDefault valueDescription
tabstringundefinedThe id of the tab to mark
fireCallbackbooleantruewether or not to call activeCb

Returns

void

Defined in

src/ui/tabBar.ts:59