-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
tab-strip.d.ts
75 lines (62 loc) · 2.21 KB
/
tab-strip.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/**
* Contains the TabStrip class, which represents a tab strip for tab navigation.
* @module "ui/tab-navigation/tab-strip"
*/ /** */
import { Color } from "../../../color";
import { EventData, Property, View } from "../../core/view";
import { TabStripItem } from "../tab-strip-item";
/**
* Represents a tab strip.
*/
export class TabStrip extends View {
/**
* Gets or sets the items of the tab strip.
*/
items: Array<TabStripItem>;
/**
* Gets or sets whether icon size should be fixed based on specs or use the actual size. Defaults to true(fixed).
*/
isIconSizeFixed: boolean;
/**
* Gets or sets the icon rendering mode on iOS
*/
iosIconRenderingMode: "automatic" | "alwaysOriginal" | "alwaysTemplate";
/**
* Gets or sets the color that marks the selected tab of the tab strip. Works for Tabs component only.
*/
highlightColor: Color;
/**
* @private
*/
_hasImage: boolean;
/**
* @private
*/
_hasTitle: boolean;
/**
* String value used when hooking to itemTap event.
*/
public static itemTapEvent: string;
/**
* A basic method signature to hook an event listener (shortcut alias to the addEventListener method).
* @param eventNames - String corresponding to events (e.g. "propertyChange"). Optionally could be used more events separated by `,` (e.g. "propertyChange", "change").
* @param callback - Callback function which will be executed when event is raised.
* @param thisArg - An optional parameter which will be used as `this` context for callback execution.
*/
on(eventNames: string, callback: (data: EventData) => void, thisArg?: any);
/**
* Raised when an TabStripItem is tapped.
*/
on(event: "itemTap", callback: (args: TabStripItemEventData) => void, thisArg?: any);
}
/**
* Event data containing information for the TabStripItem's index.
*/
export interface TabStripItemEventData extends EventData {
/**
* The index of the TabStripItem.
*/
index: number;
}
export const iosIconRenderingModeProperty: Property<TabStrip, "automatic" | "alwaysOriginal" | "alwaysTemplate">;
export const isIconSizeFixedProperty: Property<TabStrip, boolean>;