Skip to content

Commit

Permalink
Add Checkbox to migration guide
Browse files Browse the repository at this point in the history
  • Loading branch information
m4theushw committed Apr 21, 2021
1 parent ea3e135 commit a1e5c24
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/src/pages/guides/migration-v4/migration-v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,21 @@ As the core components use emotion as a styled engine, the props used by emotion
+<Button />
```

### Checkbox

- Remove the second argument from `onChange`. You can pull out the checked state by accessing `event.target.checked`.

```diff
function MyCheckbox() {
- const handleChange = (event: React.ChangeEvent<HTMLInputElement>, checked: boolean) => {
+ const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
+ const checked = event.target.checked;
};

return <Checkbox onChange={handleChange} />;
}
```

### Chip

- Rename `default` variant to `filled` for consistency.
Expand Down

0 comments on commit a1e5c24

Please sign in to comment.