File tree 2 files changed +7
-9
lines changed 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -70,11 +70,13 @@ export const withWebComponent = <T extends {}>(
70
70
return Object . entries ( rest )
71
71
. filter ( ( [ slotName ] ) => slotProperties . includes ( slotName ) )
72
72
. map ( ( [ slotName , slotValue ] ) => {
73
- return Children . map ( slotValue , ( item : ReactElement , index ) =>
74
- cloneElement ( item , {
75
- key : `${ slotName } -${ index } ` ,
76
- slot : slotName
77
- } )
73
+ return Children . map (
74
+ slotValue ?. type === React . Fragment ? slotValue . props . children : slotValue ,
75
+ ( item : ReactElement , index ) =>
76
+ cloneElement ( item , {
77
+ key : `${ slotName } -${ index } ` ,
78
+ slot : slotName
79
+ } )
78
80
) ;
79
81
} ) ;
80
82
} ,
Original file line number Diff line number Diff line change @@ -25,19 +25,15 @@ export const generatedDefaultStory = () => (
25
25
< TableColumn style = { { width : '12rem' } } >
26
26
< Label > Product</ Label >
27
27
</ TableColumn >
28
-
29
28
< TableColumn minWidth = { 800 } popinText = "Supplier" >
30
29
< Label > Supplier</ Label >
31
30
</ TableColumn >
32
-
33
31
< TableColumn minWidth = { 600 } popinText = "Dimensions" demandPopin >
34
32
< Label > Dimensions</ Label >
35
33
</ TableColumn >
36
-
37
34
< TableColumn minWidth = { 600 } popinText = "Weight" demandPopin >
38
35
< Label > Weight</ Label >
39
36
</ TableColumn >
40
-
41
37
< TableColumn >
42
38
< Label > Price</ Label >
43
39
</ TableColumn >
You can’t perform that action at this time.
0 commit comments