Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
BUG: Solve handle checkbox click (under construction)(sc2328)
Browse files Browse the repository at this point in the history
  • Loading branch information
guerrato committed Jan 24, 2022
1 parent d0a8668 commit 1d0b9f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/components/inputs/Checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export type CheckboxProps = {
id?: string
label?: string
checked?: boolean
onChange?: ChangeEventHandler<HTMLInputElement>
onChange?: (checked: boolean) => void
checkedContent?: ReactNode
uncheckedContent?: ReactNode
typography?: TypographyStyle
Expand Down Expand Up @@ -76,7 +76,7 @@ export const Checkbox = forwardRef(
id={id}
className={props.className}
checked={checked}
onChange={props.onChange}
onChange={(e) => setIsChecked(e.target.checked)}
{...styles}
/>
<SpanEl {...styles}>{checked ? checkedContent : uncheckedContent}</SpanEl>
Expand Down

0 comments on commit 1d0b9f4

Please sign in to comment.