Skip to content

Commit f888835

Browse files
committed
Enable to add a custom class name to Filset input group wrapper
1 parent 300ee46 commit f888835

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/shared/Fieldset.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export namespace FieldsetProps {
1919
export type Common = {
2020
className?: string;
2121
id?: string;
22-
classes?: Partial<Record<"root" | "legend" | "content", string>>;
22+
classes?: Partial<Record<"root" | "legend" | "content" | "inputGroup", string>>;
2323
style?: CSSProperties;
2424
legend?: ReactNode;
2525
hintText?: ReactNode;
@@ -151,10 +151,13 @@ export const Fieldset = memo(
151151
<div className={cx(fr.cx("fr-fieldset__content"), classes.content)}>
152152
{options.map(({ label, hintText, nativeInputProps, ...rest }, i) => (
153153
<div
154-
className={fr.cx(
155-
`fr-${type}-group`,
156-
isRichRadio && "fr-radio-rich",
157-
small && `fr-${type}-group--sm`
154+
className={cx(
155+
fr.cx(
156+
`fr-${type}-group`,
157+
isRichRadio && "fr-radio-rich",
158+
small && `fr-${type}-group--sm`
159+
),
160+
classes.inputGroup
158161
)}
159162
key={i}
160163
>

0 commit comments

Comments
 (0)