Skip to content

Commit

Permalink
fix: #289 partial revert of #275
Browse files Browse the repository at this point in the history
  • Loading branch information
ddecrulle committed Aug 19, 2024
1 parent 7758082 commit 7ddd66e
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions src/ToggleSwitch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,18 +120,16 @@ export const ToggleSwitch = memo(
checked={props_checked ?? checked}
name={name}
/>
{label && (
<label
className={cx(fr.cx("fr-toggle__label"), classes.label)}
htmlFor={inputId}
{...(showCheckedHint && {
"data-fr-checked-label": t("checked"),
"data-fr-unchecked-label": t("unchecked")
})}
>
{label}
</label>
)}
<label
className={cx(fr.cx("fr-toggle__label"), classes.label)}
htmlFor={inputId}
{...(showCheckedHint && {
"data-fr-checked-label": t("checked"),
"data-fr-unchecked-label": t("unchecked")
})}
>
{label}
</label>
{helperText && (
<p className={cx(fr.cx("fr-hint-text"), classes.hint)} id={hintId}>
{helperText}
Expand Down

0 comments on commit 7ddd66e

Please sign in to comment.