Skip to content

Commit

Permalink
Répare l'erreur console de la Checkbox du DS plus proprement
Browse files Browse the repository at this point in the history
  • Loading branch information
cparthur committed Dec 18, 2024
1 parent 34d94fd commit 32ebde4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/ui/src/design-system/Checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ export const Checkbox = forwardRef(
variant = 'checkbox',
id,
checked,
onChange = () => null,
onChange,
readOnly,
...remainingProps
}: CheckboxProps,
ref?: Ref<HTMLInputElement>
Expand All @@ -48,6 +49,7 @@ export const Checkbox = forwardRef(
type="checkbox"
ref={ref}
checked={checked ?? false}
readOnly={readOnly ?? !onChange}
onChange={onChange}
className={classNames(
// styles communs
Expand Down

0 comments on commit 32ebde4

Please sign in to comment.