🐛(react) fix Field that can be compact and fullWidth

Being able to define the Field to be compact and fullWidth at the
same time was misleading. We need to be able to set the Switch
component fullWidth if needed, while by default it is compact. This
change makes possible the fullWidth props to override compact mode.
This commit is contained in:
Nathan Vasse
2023-05-17 15:19:51 +02:00
committed by NathanVss
parent e72606cfcd
commit ec8def0cb1

View File

@@ -27,7 +27,7 @@ export const Field = ({
<div
className={classNames("c__field", "c__field--" + state, className, {
"c__field--full-width": fullWidth,
"c__field--compact": compact,
"c__field--compact": compact && !fullWidth,
})}
>
{children}