@fengxi/ui-framework
Version:
Cocos Creator UI框架库 类似鸿蒙的UI框架
37 lines (36 loc) • 961 B
TypeScript
export interface UICommonAttribute {
width(width: number): this;
height(height: number): this;
backgroundColor(color: Color): this;
}
export interface UILayoutCommonAttribute extends UICommonAttribute {
alignItems(alignItems: VerticalAlign | HorizontalAlign): this;
justifyContent(justifyContent: VerticalAlign | HorizontalAlign): this;
padding(padding: Direction | number): this;
}
export interface Direction {
top: number;
bottom: number;
left: number;
right: number;
}
export type Color = string | number | ColorEnum;
export declare enum ColorEnum {
Red = "#ff0000",
Green = "#00ff00",
Blue = "#0000ff",
White = "#ffffff",
Black = "#000000",
Gray = "#808080",
Yellow = "#ffff00",
Cyan = "#00ffff",
transparent = "#ffffff00"
}
export declare enum VerticalAlign {
Top = "top",
Bottom = "bottom"
}
export declare enum HorizontalAlign {
Left = "left",
Right = "right"
}