Skip to content

Commit

Permalink
Add changes to migration guide
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrookes committed Dec 12, 2020
1 parent d8c1aef commit 94e24ef
Showing 1 changed file with 53 additions and 31 deletions.
84 changes: 53 additions & 31 deletions docs/src/pages/guides/migration-v4/migration-v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,14 @@ const classes = makeStyles(theme => ({
+<Button />
```

### Chip

- Rename `default` variant to `filled` for consistency.
```diff
-<Chip variant="default">
+<Chip variant="filled">
```

### CircularProgress

- The `static` variant has been merged into the `determinate` variant, with the latter assuming the appearance of the former.
Expand Down Expand Up @@ -549,14 +557,6 @@ const classes = makeStyles(theme => ({
+<Fab variant="circular">
```

### Chip

- Rename `default` variant to `filled` for consistency.
```diff
-<Chip variant="default">
+<Chip variant="filled">
```

### Grid

- Rename `justify` prop with `justifyContent` to be aligned with the CSS property name.
Expand All @@ -576,29 +576,39 @@ const classes = makeStyles(theme => ({
- Use CSS object-fit. For IE11 support either use a polyfill such as
https://www.npmjs.com/package/object-fit-images, or continue to use the v4 component.

```diff
-import GridList from '@material-ui/core/GridList';
-import GridListTile from '@material-ui/core/GridListTile';
-import GridListTileBar from '@material-ui/core/GridListTileBar';
+import ImageList from '@material-ui/core/ImageList';
+import ImageListItem from '@material-ui/core/ImageListItem';
+import ImageListItemBar from '@material-ui/core/ImageListItemBar';

-<GridList spacing={8} cellHeight={200}>
- <GridListTile>
+<ImageList gap={8} rowHeight={200}>
+ <ImageListItem>
<img src="file.jpg" alt="Image title" />
- <GridListTileBar
+ <ImageListItemBar
title="Title"
subtitle="Subtitle"
/>
- </GridListTile>
-</GridList>
+ </ImageListItem>
+</ImageList>
```
```diff
-import GridList from '@material-ui/core/GridList';
-import GridListTile from '@material-ui/core/GridListTile';
-import GridListTileBar from '@material-ui/core/GridListTileBar';
+import ImageList from '@material-ui/core/ImageList';
+import ImageListItem from '@material-ui/core/ImageListItem';
+import ImageListItemBar from '@material-ui/core/ImageListItemBar';

-<GridList spacing={8} cellHeight={200}>
- <GridListTile>
+<ImageList gap={8} rowHeight={200}>
+ <ImageListItem>
<img src="file.jpg" alt="Image title" />
- <GridListTileBar
+ <ImageListItemBar
title="Title"
subtitle="Subtitle"
/>
- </GridListTile>
-</GridList>
+ </ImageListItem>
+</ImageList>
```

### Icon

- The default value of `fontSize` was changed from `default` to `medium` for consistency.
In the unlikey event that you were using the value `default`, the prop can be removed:

```diff
-<Icon fontSize="default">icon-name</Icon>
+<Icon>icon-name</Icon>
```

### Menu

Expand Down Expand Up @@ -907,6 +917,18 @@ const classes = makeStyles(theme => ({
+</Stepper>
```

### SvgIcon

- The default value of `fontSize` was changed from `default` to `medium` for consistency.
In the unlikey event that you were using the value `default`, the prop can be removed:

```diff
-<SvgIcon fontSize="default">
+<SvgIcon>
<path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z" />
</SvgIcon>
```

### Table

- The customization of the table pagination's actions labels must be done with the `getItemAriaLabel` prop. This increases consistency with the `Pagination` component.
Expand Down

0 comments on commit 94e24ef

Please sign in to comment.