File tree 1 file changed +4
-3
lines changed
packages/ui/src/components/Button
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -29,20 +29,21 @@ const processChildren = (
29
29
) : ReactNode => {
30
30
return Children . map ( children as ReactElement < ButtonProps > [ ] , ( child , index ) => {
31
31
if ( isValidElement ( child ) ) {
32
- const positionInGroupProp = ( child . type == Button ) ? { positionInGroup : determinePosition ( index , Children . count ( children ) ) } : { } ;
32
+ const positionInGroupProp =
33
+ child . type == Button ? { positionInGroup : determinePosition ( index , Children . count ( children ) ) } : { } ;
33
34
// Check if the child has nested children
34
35
if ( child . props . children ) {
35
36
// Recursively process nested children
36
37
return cloneElement ( child , {
37
38
...child . props ,
38
39
children : processChildren ( child . props . children , outline , pill ) ,
39
- ...positionInGroupProp
40
+ ...positionInGroupProp ,
40
41
} ) ;
41
42
} else {
42
43
return cloneElement ( child , {
43
44
outline,
44
45
pill,
45
- ...positionInGroupProp
46
+ ...positionInGroupProp ,
46
47
} ) ;
47
48
}
48
49
}
You can’t perform that action at this time.
0 commit comments