mirror of
https://github.com/zhigang1992/react.git
synced 2026-01-26 22:27:03 +08:00
* 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
36 lines
768 B
TypeScript
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]
|