Merge pull request #5506 from SDA-SE/feat/link-grid-item

Support `gridItem` variant for `EntityLinksCard`
This commit is contained in:
Patrik Oldsberg
2021-04-29 10:54:33 +02:00
committed by GitHub
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 />
) : (