Skip to content

Commit

Permalink
[docs] Fix ExpansionPanel migration notes
Browse files Browse the repository at this point in the history
- Fix `focused` removal falsely pointing to `Accordion` (instead of `AccordionSummary`)
- Fix some migration notes not having their own heading
  • Loading branch information
eps1lon committed Jul 19, 2021
1 parent 0c36064 commit 3d7afe5
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions docs/src/pages/guides/migration-v4/migration-v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -1243,21 +1243,26 @@ As the core components use emotion as their style engine, the props used by emot
+<Accordion onChange={(event: React.SyntheticEvent, expanded: boolean) => {}} />
```

### ExpansionPanelDetails

- Remove `display: flex` from `AccordionDetails` (formerly `ExpansionPanelDetails`) as its too opinionated.
Most developers expect a display block.

### ExpansionPanelSummary

- Rename `focused` to `focusVisible` for consistency:

```diff
<Accordion
classes={{
<AccordionSummary
classes={{
- focused: 'custom-focus-visible-classname',
+ focusVisible: 'custom-focus-visible-classname',
}}
/>
}}
/>
```

- Remove `display: flex` from AccordionDetails as its too opinionated.
Most developers expect a display block.
- Remove `IconButtonProps` prop from AccordionSummary.
The component renders a `<div>` element instead of an IconButton.
- Remove `IconButtonProps` prop from `AccordionSummary` (formerly `ExpansionPanelSummary`).
The component renders a `<div>` element instead of an `IconButton`.
The prop is no longer necessary.

### Fab
Expand Down

0 comments on commit 3d7afe5

Please sign in to comment.