@@ -10,7 +10,13 @@ import { computed, defineComponent, h, PropType } from '@vue/runtime-core'
10
10
11
11
export interface BoxProps extends HTMLChakraProps < 'div' > { }
12
12
13
- const CBoxImpl = defineComponent ( {
13
+ /**
14
+ * Box is the most abstract component on top of which other chakra
15
+ * components are built. It renders a `div` element by default.
16
+ *
17
+ * @see Docs https://vue.chakra-ui.com/docs/layout/box
18
+ */
19
+ export const CBox : ComponentWithProps < DeepPartial < BoxProps > > = defineComponent ( {
14
20
props : {
15
21
as : {
16
22
type : [ String , Object ] as PropType < DOMElements > ,
@@ -31,14 +37,6 @@ const CBoxImpl = defineComponent({
31
37
} ,
32
38
} )
33
39
34
- /**
35
- * Box is the most abstract component on top of which other chakra
36
- * components are built. It renders a `div` element by default.
37
- *
38
- * @see Docs https://vue.chakra-ui.com/docs/layout/box
39
- */
40
- export const CBox = CBoxImpl as ComponentWithProps < DeepPartial < BoxProps > >
41
-
42
40
/**
43
41
* As a constraint, you can't pass size related props
44
42
* Only `size` would be allowed
@@ -56,7 +54,9 @@ export interface SquareProps extends Omit<BoxProps, Omitted> {
56
54
centerContent ?: boolean
57
55
}
58
56
59
- const CSquareImpl = defineComponent ( {
57
+ export const CSquare : ComponentWithProps <
58
+ DeepPartial < SquareProps >
59
+ > = defineComponent ( {
60
60
props : {
61
61
size : [ Object , String , Number ] as PropType < SquareProps [ 'size' ] > ,
62
62
centerContent : {
@@ -89,11 +89,9 @@ const CSquareImpl = defineComponent({
89
89
} ,
90
90
} )
91
91
92
- export const CSquare = CSquareImpl as ComponentWithProps <
92
+ export const CCircle : ComponentWithProps <
93
93
DeepPartial < SquareProps >
94
- >
95
-
96
- const CCircleImpl = defineComponent ( {
94
+ > = defineComponent ( {
97
95
setup ( _ , { slots, attrs } ) {
98
96
return ( ) => {
99
97
return h (
@@ -108,7 +106,3 @@ const CCircleImpl = defineComponent({
108
106
}
109
107
} ,
110
108
} )
111
-
112
- export const CCircle = CCircleImpl as ComponentWithProps <
113
- DeepPartial < SquareProps >
114
- >
0 commit comments