Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Collapse] Add orientation and horizontal support #20619

Merged
merged 3 commits into from
Jul 3, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/src/pages/guides/migration-v4/migration-v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@ yarn add @material-ui/core@next
+<Button />
```

### Collapse

- The `collapsedHeight` prop was renamed `collapsedSize` to support the horizontal direction.

```diff
-<Collapse collapsedHeight={40}>
+<Collapse collapsedSize={40}>
```

### Divider

- Use border instead of background color. It prevents inconsistent height on scaled screens. For people customizing the color of the border, the change requires changing the override CSS property:
Expand Down
5 changes: 2 additions & 3 deletions packages/material-ui/src/Collapse/Collapse.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@ import { useForkRef } from '../utils';
export const styles = (theme) => ({
/* Styles applied to the container element. */
container: {
position: 'relative',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seem irrelevant

overflow: 'hidden',
height: 0,
overflow: 'hidden',
transition: theme.transitions.create('height'),
'&$horizontal': {
width: 0,
height: 'auto',
width: 0,
transition: theme.transitions.create('width'),
},
},
Expand Down