UNPKG

@alexanderjeurissen/flex

Version:

A declarative React primitive Flex component that exposes flexbox specification in JSX

56 lines (55 loc) 2.28 kB
declare type FLEX = "flex"; declare type INLINE_FLEX = "inline-flex"; export declare type DISPLAY = FLEX | INLINE_FLEX; declare type COLUMN = "column"; declare type COLUMN_REVERSE = "column-reverse"; declare type ROW = "row"; declare type ROW_REVERSE = "row-reverse"; export declare type DIRECTION = COLUMN | COLUMN_REVERSE | ROW | ROW_REVERSE; declare type BASELINE = "baseline"; declare type CENTER = "center"; declare type FLEX_END = "flex-end"; declare type FLEX_START = "flex-start"; declare type SPACE_AROUND = "space-around"; declare type SPACE_BETWEEN = "space-between"; declare type SPACE_EVENLY = "space-evenly"; declare type STRETCH = "stretch"; export declare type Align = BASELINE | CENTER | FLEX_END | FLEX_START | SPACE_AROUND | SPACE_BETWEEN | SPACE_EVENLY | STRETCH; declare type WRAP = "wrap"; declare type NO_WRAP = "nowrap"; declare type WRAP_REVERSE = "wrap-reverse"; export declare type WRAPPING = WRAP | NO_WRAP | WRAP_REVERSE; interface FlexProps { alignContent?: FLEX_START | FLEX_END | CENTER | STRETCH | SPACE_AROUND | SPACE_BETWEEN; alignItems?: FLEX_START | FLEX_END | CENTER | STRETCH | BASELINE; alignSelf?: FLEX_START | FLEX_END | CENTER | STRETCH | BASELINE; children: any; display?: FLEX | INLINE_FLEX; flex?: string | number; flexBasis?: string | number; flexDirection?: COLUMN | COLUMN_REVERSE | ROW | ROW_REVERSE; flexGrow?: string | number; flexShrink?: string | number; flexWrap?: NO_WRAP | WRAP_REVERSE | WRAP; height?: string | number; justifyContent?: FLEX_START | FLEX_END | CENTER | SPACE_BETWEEN | SPACE_AROUND | SPACE_EVENLY; margin?: string | number; marginBottom?: string | number; marginLeft?: string | number; marginRight?: string | number; marginTop?: string | number; maxHeight?: string | number; maxWidth?: string | number; minHeight?: string | number; minWidth?: string | number; order?: number; padding?: string | number; paddingBottom?: string | number; paddingLeft?: string | number; paddingRight?: string | number; paddingTop?: string | number; style?: object; width?: string | number; } declare const Flex: import("styled-components").StyledComponent<"div", any, FlexProps, never>; export default Flex;