Skip to content

Commit c670a2a

Browse files
Update src/shared/Fieldset.tsx
Co-authored-by: Joseph Garrone <joseph.garrone.gj@gmail.com> Signed-off-by: maxi_malain <32595427+maximallain@users.noreply.github.com>
1 parent 69bf301 commit c670a2a

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/shared/Fieldset.tsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,8 @@ export const Fieldset = memo(
150150
</legend>
151151
)}
152152
<div className={cx(fr.cx("fr-fieldset__content"), classes.content)}>
153-
{options.map(({ label, hintText, nativeInputProps }, i) => {
154-
const divClassName = small
155-
? fr.cx(`fr-${type}-group`, `fr-${type}-group--sm`)
156-
: fr.cx(`fr-${type}-group`);
157-
158-
return (
159-
<div className={divClassName} key={i}>
153+
{options.map(({ label, hintText, nativeInputProps }, i) =>
154+
<div className={fr.cx(`fr-${type}-group`, small && `fr-${type}-group--sm`)} key={i}>
160155
<input
161156
type={type}
162157
id={getInputId(i)}
@@ -170,8 +165,7 @@ export const Fieldset = memo(
170165
)}
171166
</label>
172167
</div>
173-
);
174-
})}
168+
)}
175169
</div>
176170
{state !== "default" && (
177171
<p

0 commit comments

Comments
 (0)