Merge pull request #7465 from backstage/jhaals/fix-deprecation

Catalog: Replace deprecated material ui components
This commit is contained in:
Johan Haals
2021-10-06 10:12:05 +02:00
committed by GitHub
2 changed files with 10 additions and 5 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog': patch
---
Replace deprecated material UI components used by LinksCard to remove errors from console log
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { GridList, GridListTile } from '@material-ui/core';
import { ImageList, ImageListItem } from '@material-ui/core';
import React from 'react';
import { IconLink } from './IconLink';
import { ColumnBreakpoints } from './types';
@@ -36,12 +36,12 @@ export const LinksGridList = ({ items, cols = undefined }: Props) => {
const numOfCols = useDynamicColumns(cols);
return (
<GridList cellHeight="auto" cols={numOfCols}>
<ImageList rowHeight="auto" cols={numOfCols}>
{items.map(({ text, href, Icon }, i) => (
<GridListTile key={i}>
<ImageListItem key={i}>
<IconLink href={href} text={text ?? href} Icon={Icon} />
</GridListTile>
</ImageListItem>
))}
</GridList>
</ImageList>
);
};