Catalog: Replace deprecated material ui components

Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
Johan Haals
2021-10-06 09:41:43 +02:00
parent 7d3228fefb
commit 1c5c5b23fb
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>
);
};