mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: format
This commit is contained in:
@@ -15,31 +15,38 @@ export * from "../tab-navigation-base/tab-strip-item";
|
||||
export const traceCategory = "TabView";
|
||||
|
||||
export module knownCollections {
|
||||
export const items = "items";
|
||||
export const items = "items";
|
||||
}
|
||||
|
||||
@CSSType("Tabs")
|
||||
export class TabsBase extends TabNavigationBase implements TabsDefinition {
|
||||
public swipeEnabled: boolean;
|
||||
public offscreenTabLimit: number;
|
||||
public tabsPosition: "top" | "bottom";
|
||||
public iOSTabBarItemsAlignment: IOSTabBarItemsAlignment;
|
||||
public swipeEnabled: boolean;
|
||||
public offscreenTabLimit: number;
|
||||
public tabsPosition: "top" | "bottom";
|
||||
public iOSTabBarItemsAlignment: IOSTabBarItemsAlignment;
|
||||
}
|
||||
|
||||
// TODO: Add Unit tests
|
||||
export const swipeEnabledProperty = new Property<TabsBase, boolean>({
|
||||
name: "swipeEnabled", defaultValue: true, valueConverter: booleanConverter
|
||||
name: "swipeEnabled",
|
||||
defaultValue: true,
|
||||
valueConverter: booleanConverter,
|
||||
});
|
||||
swipeEnabledProperty.register(TabsBase);
|
||||
|
||||
// TODO: Add Unit tests
|
||||
// TODO: Coerce to max number of items?
|
||||
export const offscreenTabLimitProperty = new Property<TabsBase, number>({
|
||||
name: "offscreenTabLimit", defaultValue: 1, valueConverter: (v) => parseInt(v)
|
||||
name: "offscreenTabLimit",
|
||||
defaultValue: 1,
|
||||
valueConverter: (v) => parseInt(v),
|
||||
});
|
||||
offscreenTabLimitProperty.register(TabsBase);
|
||||
|
||||
export const tabsPositionProperty = new Property<TabsBase, "top" | "bottom">({ name: "tabsPosition", defaultValue: "top" });
|
||||
export const tabsPositionProperty = new Property<TabsBase, "top" | "bottom">({
|
||||
name: "tabsPosition",
|
||||
defaultValue: "top",
|
||||
});
|
||||
tabsPositionProperty.register(TabsBase);
|
||||
|
||||
export type IOSTabBarItemsAlignment = "leading" | "justified" | "center" | "centerSelected";
|
||||
|
||||
Reference in New Issue
Block a user