ant-design-vue/components/flex/interface.ts
selicens dae7262f13
feat(Flex): New component (#7052)
* feat(Flex): New component

* fix: Unified type

* test: Add unit test and update snapshots

* docs: update md file

---------

Co-authored-by: undefined <undefined>
2023-11-11 10:06:02 +08:00

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>;