Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit 8195e4f

Browse files
committed
chore(types): update types
1 parent 53f551d commit 8195e4f

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

packages/layout/src/list.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
} from '@chakra-ui/vue-system'
1010
import { h, defineComponent, PropType, computed } from 'vue'
1111
import { chakra, DOMElements } from '@chakra-ui/vue-system'
12-
import { getValidChildren } from '@chakra-ui/vue-utils'
12+
import { getValidChildren, SNAO, SAO } from '@chakra-ui/vue-utils'
1313

1414
interface ListOptions {
1515
/**
@@ -46,13 +46,11 @@ export const CList = defineComponent({
4646
default: 'ul',
4747
},
4848
styleType: {
49-
type: [Object, String, Array] as PropType<ListProps['listStyleType']>,
49+
type: SAO as PropType<ListProps['listStyleType']>,
5050
default: 'none',
5151
},
52-
stylePosition: [Object, String, Array] as PropType<
53-
ListProps['listStylePosition']
54-
>,
55-
spacing: [Object, String, Array] as PropType<ListProps['margin']>,
52+
stylePosition: SAO as PropType<ListProps['listStylePosition']>,
53+
spacing: SNAO as PropType<ListProps['margin']>,
5654
},
5755
setup(props, { slots, attrs }) {
5856
const styles = useMultiStyleConfig('List', props)

packages/layout/src/stack.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
selector,
1616
StackDirection,
1717
} from './stack.utils'
18-
import { getValidChildren } from '@chakra-ui/vue-utils'
18+
import { getValidChildren, SNAO, SAO } from '@chakra-ui/vue-utils'
1919

2020
interface StackOptions {
2121
/**
@@ -102,14 +102,14 @@ const stackProps = {
102102
type: [Object, String] as PropType<DOMElements>,
103103
default: 'div',
104104
},
105-
align: [Object, String, Array] as PropType<StackProps['align']>,
106-
justify: [Object, String, Array] as PropType<StackProps['justify']>,
107-
wrap: [Object, String, Array] as PropType<StackProps['wrap']>,
105+
align: SAO as PropType<StackProps['align']>,
106+
justify: SAO as PropType<StackProps['justify']>,
107+
wrap: SAO as PropType<StackProps['wrap']>,
108108
spacing: {
109-
type: [Object, String, Array] as PropType<StackProps['spacing']>,
109+
type: SNAO as PropType<StackProps['spacing']>,
110110
default: '0.5rem',
111111
},
112-
direction: [Object, String, Array] as PropType<StackProps['direction']>,
112+
direction: SAO as PropType<StackProps['direction']>,
113113

114114
// todo: divider
115115
divider: [Object, Boolean] as PropType<StackProps['divider']>,

packages/utils/src/props.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ export const vueThemingProps = {
99
}
1010

1111
export const SNA = [Number, String, Array]
12+
export const SAO = [String, Array, Object]
1213
export const SNAO = [Number, String, Array, Object]

0 commit comments

Comments
 (0)