Updated LinksGroup to use Link over ListItem

Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com>
This commit is contained in:
Andre Wanlin
2023-02-09 13:29:00 -06:00
parent 92444b3521
commit 5a4fa8859b
3 changed files with 11 additions and 3 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-org': patch
---
Updated `LinksGroup` to use `Link` over `ListItem` as this makes the links more obvious and follows the pattern already used in the `GroupProfileCard`. Also updated the `GroupProfileCard` `ExtraDetails` story in Storybook to enable the `showLinks` feature whith this off there is no difference between it and the `default` story.
@@ -123,7 +123,7 @@ export const ExtraDetails = () => (
<EntityProvider entity={extraDetailsEntity}>
<Grid container spacing={4}>
<Grid item xs={12} md={4}>
<GroupProfileCard variant="gridItem" />
<GroupProfileCard variant="gridItem" showLinks />
</Grid>
</Grid>
</EntityProvider>
@@ -23,6 +23,7 @@ import {
Divider,
} from '@material-ui/core';
import React from 'react';
import { Link } from '@backstage/core-components';
const WebLink = ({
href,
@@ -33,9 +34,11 @@ const WebLink = ({
text?: string;
Icon?: IconComponent;
}) => (
<ListItem button component="a" key={href} href={href}>
<ListItem key={href}>
<ListItemIcon>{Icon ? <Icon /> : <LanguageIcon />}</ListItemIcon>
<ListItemText>{text}</ListItemText>
<ListItemText>
<Link to={href}>{text}</Link>
</ListItemText>
</ListItem>
);