Skip to content

Commit

Permalink
docs(Checkbox): update Checkbox.mdx (#14661)
Browse files Browse the repository at this point in the history
Updated based on slack feedback
  • Loading branch information
tw15egan authored Sep 18, 2023
1 parent 70d9dfd commit 345ac5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react/src/components/Checkbox/Checkbox.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ You can also use a controlled checkbox component driven by state:
```jsx
function ExampleComponent() {
const [isChecked, setIsChecked] = useState(false);
return <Checkbox checked={isChecked} onChange={setIsChecked} />;
return <Checkbox id="checkbox" labelText="checkbox" checked={isChecked} onChange={(_, { checked }) => setIsChecked(checked)} />;
}
```

Expand Down

0 comments on commit 345ac5b

Please sign in to comment.