Support gridItem variant for EntityLinksCard

This makes it similar to other cards.

Signed-off-by: Oliver Sand <oliver.sand@sda-se.com>
This commit is contained in:
Oliver Sand
2021-04-28 09:12:15 +02:00
parent f72aa8116a
commit da546ce005
2 changed files with 8 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog': patch
---
Support `gridItem` variant for `EntityLinksCard`.
@@ -27,9 +27,10 @@ type Props = {
/** @deprecated The entity is now grabbed from context instead */
entity?: Entity;
cols?: ColumnBreakpoints | number;
variant?: 'gridItem';
};
export const EntityLinksCard = ({ cols = undefined }: Props) => {
export const EntityLinksCard = ({ cols = undefined, variant }: Props) => {
const { entity } = useEntity();
const app = useApp();
@@ -39,7 +40,7 @@ export const EntityLinksCard = ({ cols = undefined }: Props) => {
const links = entity?.metadata?.links;
return (
<InfoCard title="Links">
<InfoCard title="Links" variant={variant}>
{!links || links.length === 0 ? (
<EntityLinksEmptyState />
) : (