Files
react/components/grid/grid-types.ts
witt e8a7a17d56 feat: export all types related to components (#562)
* feat: export all types related to components

fix(tooltip): fix the vertical offset of the arrow

* refactor: optimize events of all popup related components

* test: append testcases for popup base component

* test: add testcase for visible events

* test: update snapshots
2021-06-23 23:05:59 +08:00

36 lines
768 B
TypeScript

import { tuple } from '../utils/prop-types'
const justify = tuple(
'flex-start',
'center',
'flex-end',
'space-between',
'space-around',
'space-evenly',
)
export type GridJustify = typeof justify[number]
const alignItems = tuple('flex-start', 'center', 'flex-end', 'stretch', 'baseline')
export type GridAlignItems = typeof alignItems[number]
const alignContent = tuple(
'stretch',
'center',
'flex-start',
'flex-end',
'space-between',
'space-around',
)
export type GridAlignContent = typeof alignContent[number]
const direction = tuple('row', 'row-reverse', 'column', 'column-reverse')
export type GridDirection = typeof direction[number]
const wrap = tuple('nowrap', 'wrap', 'wrap-reverse')
export type GridWrap = typeof wrap[number]