This repository was archived by the owner on Sep 20, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +19
-26
lines changed Expand file tree Collapse file tree 1 file changed +19
-26
lines changed Original file line number Diff line number Diff line change @@ -79,24 +79,20 @@ export const CWrap: ComponentWithProps<WrapProps> = defineComponent({
79
79
} ) )
80
80
81
81
const childrenToRender = props . shouldWrapChildren
82
- ? getValidChildren ( slots ) . map ( ( child , index ) =>
83
- h ( CWrapItem , { key : index } , child )
84
- )
82
+ ? getValidChildren ( slots ) . map ( ( child , index ) => (
83
+ < CWrapItem key = { index } > { child } </ CWrapItem >
84
+ ) )
85
85
: slots
86
86
87
87
return ( ) => {
88
- return h (
89
- chakra ( props . as , {
90
- label : "wrap" ,
91
- ...attrs ,
92
- } ) ,
93
- { } ,
94
- ( ) =>
95
- h (
96
- chakra ( "ul" , { label : "wrap__list" , __css : styles . value } ) ,
97
- { } ,
98
- childrenToRender
99
- )
88
+ return (
89
+ < chakra . div as = { props . as } __label = "wrap" { ...attrs } >
90
+ { ( ) => (
91
+ < chakra . ul __label = "wrap__list" __css = { styles . value } >
92
+ { childrenToRender }
93
+ </ chakra . ul >
94
+ ) }
95
+ </ chakra . div >
100
96
)
101
97
}
102
98
} ,
@@ -107,17 +103,14 @@ export interface WrapItemProps extends HTMLChakraProps<"li"> {}
107
103
export const CWrapItem = defineComponent ( {
108
104
setup ( _ , { attrs, slots } ) {
109
105
return ( ) => {
110
- return h (
111
- chakra ( "li" , {
112
- label : "wrap__listItem" ,
113
- __css : {
114
- display : "flex" ,
115
- alignItems : "flex-start" ,
116
- } ,
117
- ...attrs ,
118
- } ) ,
119
- { } ,
120
- slots
106
+ return (
107
+ < chakra . li
108
+ __label = "wrap__listItem"
109
+ __css = { { display : "flex" , alignItems : "flex-start" } }
110
+ { ...attrs }
111
+ >
112
+ { ( ) => getValidChildren ( slots ) }
113
+ </ chakra . li >
121
114
)
122
115
}
123
116
} ,
You can’t perform that action at this time.
0 commit comments