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:
@@ -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 />
|
||||
) : (
|
||||
|
||||
Reference in New Issue
Block a user