|
1 | 1 | import { h, defineComponent, PropType, reactive } from 'vue'
|
2 | 2 | import type CSS from 'csstype'
|
3 |
| -import { chakra, DOMElements, ThemingProps } from '@chakra-ui/vue-system' |
4 |
| - |
5 |
| -type ArrayOrStringProp<T> = T | T[] |
| 3 | +import { |
| 4 | + chakra, |
| 5 | + DOMElements, |
| 6 | + ThemingProps, |
| 7 | + SystemStyleObject, |
| 8 | +} from '@chakra-ui/vue-system' |
6 | 9 |
|
7 | 10 | export interface FlexProps {
|
8 | 11 | /**
|
9 | 12 | * Shorthand for `alignItems` style prop
|
10 | 13 | * @type SystemStyleObject["alignItems"]
|
11 | 14 | * SystemStyleObject because prop can be String, Array or Object
|
12 | 15 | */
|
13 |
| - align?: ArrayOrStringProp<CSS.Properties['alignItems']> |
| 16 | + align?: SystemStyleObject['alignItems'] |
14 | 17 |
|
15 | 18 | /**
|
16 | 19 | * Shorthand for `justifyContent` style prop
|
17 | 20 | * @type SystemStyleObject["justifyContent"]
|
18 | 21 | */
|
19 |
| - justify?: ArrayOrStringProp<CSS.Properties['justifyContent']> |
| 22 | + justify?: SystemStyleObject['justifyContent'] |
20 | 23 |
|
21 | 24 | /**
|
22 | 25 | * Shorthand for `flexWrap` style prop
|
23 | 26 | * @type SystemStyleObject["flexWrap"]
|
24 | 27 | */
|
25 |
| - wrap?: ArrayOrStringProp<CSS.Properties['flexWrap']> |
| 28 | + wrap?: SystemStyleObject['flexWrap'] |
26 | 29 |
|
27 | 30 | /**
|
28 | 31 | * Shorthand for `flexDirection` style prop
|
29 | 32 | * @type SystemStyleObject["flexDirection"]
|
30 | 33 | */
|
31 |
| - direction?: ArrayOrStringProp<CSS.Properties['flexDirection']> |
| 34 | + direction?: SystemStyleObject['flexDirection'] |
32 | 35 |
|
33 | 36 | /**
|
34 | 37 | * Shorthand for `flexBasis` style prop
|
35 | 38 | * @type SystemStyleObject["flexBasis"]
|
36 | 39 | */
|
37 |
| - basis?: ArrayOrStringProp<CSS.Properties['flexBasis']> |
| 40 | + basis?: SystemStyleObject['flexBasis'] |
38 | 41 |
|
39 | 42 | /**
|
40 | 43 | * Shorthand for `flexGrow` style prop
|
41 | 44 | * @type SystemStyleObject["flexGrow"]
|
42 | 45 | */
|
43 |
| - grow?: ArrayOrStringProp<CSS.Properties['flexGrow']> |
| 46 | + grow?: SystemStyleObject['flexGrow'] |
44 | 47 |
|
45 | 48 | /**
|
46 | 49 | * Shorthand for `flexShrink` style prop
|
47 | 50 | * @type SystemStyleObject["flexShrink"]
|
48 | 51 | */
|
49 |
| - shrink?: ArrayOrStringProp<CSS.Properties['flexShrink']> |
| 52 | + shrink?: SystemStyleObject['flexShrink'] |
50 | 53 | }
|
51 | 54 |
|
52 | 55 | const CFlex = defineComponent({
|
|
0 commit comments