Skip to content

Commit e02afb6

Browse files
authored
[ImageList] Fix deprecation warnings (#27502)
[ImageList] Fix deprecation warnings (#27502)
1 parent bb3b9ad commit e02afb6

File tree

6 files changed

+21
-21
lines changed

6 files changed

+21
-21
lines changed

docs/pages/api-docs/grid-list-tile-bar.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ import { GridListTileBar } from '@material-ui/core';
1818

1919
You can learn more about the difference by [reading this guide](/guides/minimizing-bundle-size/).
2020

21-
⚠️ The GridListTileBar component was renamed to ImageListTileBar to align with the current Material Design naming.
21+
⚠️ The GridListTileBar component was renamed to ImageListItemBar to align with the current Material Design naming.
2222

23-
You should use `import { ImageListTileBar } from '@material-ui/core'`
24-
or `import ImageListTileBar from '@material-ui/core/ImageListTileBar'`.
23+
You should use `import { ImageListItemBar } from '@material-ui/core'`
24+
or `import ImageListItemBar from '@material-ui/core/ImageListItemBar'`.
2525

2626
## Component name
2727

docs/pages/api-docs/grid-list-tile.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ You can learn more about the difference by [reading this guide](/guides/minimizi
2020

2121
⚠️ The GridList component was renamed to ImageList to align with the current Material Design naming.
2222

23-
You should use `import { ImageListTile } from '@material-ui/core'`
24-
or `import ImageListTile from '@material-ui/core/ImageListTile'`.
23+
You should use `import { ImageListItem } from '@material-ui/core'`
24+
or `import ImageListItem from '@material-ui/core/ImageListItem'`.
2525

2626
## Component name
2727

packages/material-ui/src/GridListTile/GridListTile.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ export interface GridListTileTypeMap<P = {}, D extends React.ElementType = 'li'>
1212
/**
1313
* ⚠️ The GridList component was renamed to ImageList to align with the current Material Design naming.
1414
*
15-
* You should use `import { ImageListTile } from '@material-ui/core'`
16-
* or `import ImageListTile from '@material-ui/core/ImageListTile'`.
15+
* You should use `import { ImageListItem } from '@material-ui/core'`
16+
* or `import ImageListItem from '@material-ui/core/ImageListItem'`.
1717
* API:
1818
*
1919
* - [GridListTile API](https://material-ui.com/api/grid-list-tile/)

packages/material-ui/src/GridListTile/GridListTile.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,19 @@ let warnedOnce = false;
7070
/**
7171
* ⚠️ The GridList component was renamed to ImageList to align with the current Material Design naming.
7272
*
73-
* You should use `import { ImageListTile } from '@material-ui/core'`
74-
* or `import ImageListTile from '@material-ui/core/ImageListTile'`.
73+
* You should use `import { ImageListItem } from '@material-ui/core'`
74+
* or `import ImageListItem from '@material-ui/core/ImageListItem'`.
7575
*/
7676
const GridListTile = React.forwardRef(function GridListTile(props, ref) {
7777
if (process.env.NODE_ENV !== 'production') {
7878
if (!warnedOnce) {
7979
warnedOnce = true;
8080
console.error(
8181
[
82-
'Material-UI: The GridListTile component was renamed to ImageListTile to align with the current Material Design naming.',
82+
'Material-UI: The GridListTile component was renamed to ImageListItem to align with the current Material Design naming.',
8383
'',
84-
"You should use `import { ImageListTile } from '@material-ui/core'`",
85-
"or `import ImageListTile from '@material-ui/core/ImageListTile'`.",
84+
"You should use `import { ImageListItem } from '@material-ui/core'`",
85+
"or `import ImageListItem from '@material-ui/core/ImageListItem'`.",
8686
].join('\n'),
8787
);
8888
}

packages/material-ui/src/GridListTileBar/GridListTileBar.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ export type GridListTileBarClassKey =
3939
| 'actionIconActionPosLeft';
4040

4141
/**
42-
* ⚠️ The GridListTileBar component was renamed to ImageListTileBar to align with the current Material Design naming.
42+
* ⚠️ The GridListTileBar component was renamed to ImageListItemBar to align with the current Material Design naming.
4343
*
44-
* You should use `import { ImageListTileBar } from '@material-ui/core'`
45-
* or `import ImageListTileBar from '@material-ui/core/ImageListTileBar'`.
44+
* You should use `import { ImageListItemBar } from '@material-ui/core'`
45+
* or `import ImageListItemBar from '@material-ui/core/ImageListItemBar'`.
4646
* API:
4747
*
4848
* - [GridListTileBar API](https://material-ui.com/api/grid-list-tile-bar/)

packages/material-ui/src/GridListTileBar/GridListTileBar.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,21 +70,21 @@ export const styles = (theme) => ({
7070
let warnedOnce = false;
7171

7272
/**
73-
* ⚠️ The GridListTileBar component was renamed to ImageListTileBar to align with the current Material Design naming.
73+
* ⚠️ The GridListTileBar component was renamed to ImageListItemBar to align with the current Material Design naming.
7474
*
75-
* You should use `import { ImageListTileBar } from '@material-ui/core'`
76-
* or `import ImageListTileBar from '@material-ui/core/ImageListTileBar'`.
75+
* You should use `import { ImageListItemBar } from '@material-ui/core'`
76+
* or `import ImageListItemBar from '@material-ui/core/ImageListItemBar'`.
7777
*/
7878
const GridListTileBar = React.forwardRef(function GridListTileBar(props, ref) {
7979
if (process.env.NODE_ENV !== 'production') {
8080
if (!warnedOnce) {
8181
warnedOnce = true;
8282
console.error(
8383
[
84-
'Material-UI: The GridListTileBar component was renamed to ImageListTileBar to align with the current Material Design naming.',
84+
'Material-UI: The GridListTileBar component was renamed to ImageListItemBar to align with the current Material Design naming.',
8585
'',
86-
"You should use `import { ImageListTileBar } from '@material-ui/core'`",
87-
"or `import ImageListTileBar from '@material-ui/core/ImageListTileBar'`.",
86+
"You should use `import { ImageListItemBar } from '@material-ui/core'`",
87+
"or `import ImageListItemBar from '@material-ui/core/ImageListItemBar'`.",
8888
].join('\n'),
8989
);
9090
}

0 commit comments

Comments
 (0)