Files
NativeScript/tns-core-modules/ui/layouts/stack-layout/stack-layout-common.ts
2019-09-19 15:40:31 +03:00

17 lines
719 B
TypeScript

import { StackLayout as StackLayoutDefinition, Orientation } from ".";
import { LayoutBase, Property, isIOS, makeValidator, makeParser, CSSType } from "../layout-base";
export * from "../layout-base";
@CSSType("StackLayout")
export class StackLayoutBase extends LayoutBase implements StackLayoutDefinition {
public orientation: Orientation;
}
StackLayoutBase.prototype.recycleNativeView = "auto";
const converter = makeParser<Orientation>(makeValidator("horizontal", "vertical"));
export const orientationProperty = new Property<StackLayoutBase, Orientation>({ name: "orientation", defaultValue: "vertical", affectsLayout: isIOS, valueConverter: converter });
orientationProperty.register(StackLayoutBase);