File tree 2 files changed +12
-5
lines changed
packages/design-system/src/components/Form/Fieldset
2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 3
3
.fieldset {
4
4
padding : 0 ;
5
5
border : none ;
6
- display : contents ;
7
6
}
8
7
9
8
.legend {
12
11
font : tokens .$coral-heading-m ;
13
12
margin : 0 ;
14
13
}
14
+
15
+ .fieldset-content {
16
+ display : flex ;
17
+ flex-flow : column ;
18
+ gap : tokens .$coral-spacing-s ;
19
+ }
Original file line number Diff line number Diff line change 1
1
import { Children , cloneElement , forwardRef } from 'react' ;
2
- import type { Ref , FieldsetHTMLAttributes } from 'react' ;
2
+ import type { FieldsetHTMLAttributes , Ref } from 'react' ;
3
3
import { isElement } from 'react-is' ;
4
4
5
5
import styles from './Fieldset.module.scss' ;
@@ -28,9 +28,11 @@ const Fieldset = forwardRef(
28
28
{ required && '*' }
29
29
</ legend >
30
30
) }
31
- { Children . toArray ( children ) . map ( child =>
32
- isElement ( child ) ? cloneElement ( child , childrenProps ) : child ,
33
- ) }
31
+ < div className = { styles [ 'fieldset-content' ] } >
32
+ { Children . toArray ( children ) . map ( child =>
33
+ isElement ( child ) ? cloneElement ( child , childrenProps ) : child ,
34
+ ) }
35
+ </ div >
34
36
</ fieldset >
35
37
) ;
36
38
} ,
You can’t perform that action at this time.
0 commit comments