mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-11-29 18:48:32 +08:00
dae7262f13
* feat(Flex): New component * fix: Unified type * test: Add unit test and update snapshots * docs: update md file --------- Co-authored-by: undefined <undefined>
17 lines
702 B
TypeScript
17 lines
702 B
TypeScript
import type { CSSProperties, ExtractPropTypes } from 'vue';
|
|
import type { SizeType } from '../config-provider/SizeContext';
|
|
import { anyType, booleanType, someType, stringType } from '../_util/type';
|
|
|
|
export const flexProps = () => ({
|
|
prefixCls: stringType(),
|
|
vertical: booleanType(),
|
|
wrap: stringType<CSSProperties['flex-wrap']>(),
|
|
justify: stringType<CSSProperties['justify-content']>(),
|
|
align: stringType<CSSProperties['align-items']>(),
|
|
flex: someType<CSSProperties['flex']>([Number, String]),
|
|
gap: someType<CSSProperties['gap'] | SizeType>([Number, String]),
|
|
component: anyType(),
|
|
});
|
|
|
|
export type FlexProps = Partial<ExtractPropTypes<ReturnType<typeof flexProps>> & HTMLElement>;
|