UNPKG

ukelli-ui

Version:

Base on React's UI lib. Make frontend's dev simpler and faster.

45 lines (44 loc) 1.5 kB
import React from 'react'; export declare type LayoutSpaces = 0 | 5 | 10 | 15 | 20 | 25 | 30; export declare type RowSet = 'auto' | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12; declare const JustifyProps: string[]; declare const AlignContentProps: string[]; declare const AlignItemProps: string[]; declare const DirectionProps: string[]; declare const WrapProps: string[]; export interface GridProps { /** children */ children?: any; /** 用于包装的外层组件 */ component?: React.ElementType | 'div' | 'span'; /** className */ className?: string; /** 边框的宽度 */ space?: LayoutSpaces; /** 对于 屏幕宽度 < 576px 的分布 */ xs?: RowSet; /** 对于 屏幕宽度 < 768px, > 576px 的分布 */ sm?: RowSet; /** 对于 屏幕宽度 < 992px, > 768px 的分布 */ lg?: RowSet; /** 对于 屏幕宽度 < 1200px, > 992px 的分布 */ xl?: RowSet; /** justify-content */ justify?: (typeof JustifyProps)[number]; /** justify-content */ alignContent?: (typeof AlignContentProps)[number]; /** justify-item */ alignItem?: (typeof AlignItemProps)[number]; /** 方向 */ direction?: (typeof DirectionProps)[number]; /** flex-wrap */ wrap?: (typeof WrapProps)[number]; /** 是否作为容器 */ container?: boolean; /** 是否作为子组件 */ item?: boolean; /** style */ style?: React.CSSProperties; } declare const Grid: React.SFC<GridProps>; export default Grid;