feat(catalog): add entity links card component

This commit is contained in:
Andrew Thauer
2021-02-10 06:12:32 -05:00
parent 0bc14f2943
commit 1df75733e9
14 changed files with 498 additions and 5 deletions
+20
View File
@@ -0,0 +1,20 @@
---
'@backstage/plugin-catalog': patch
---
Adds an `EntityLinksCard` component to display `entity.metadata.links` on entity pages. The new component is a companion for the new [Entity Links](https://backstage.io/docs/features/software-catalog/descriptor-format#links-optional) catalog model addition.
Here is an example usage within an `EntityPage.tsx`.
```tsx
// in packages/app/src/components/catalog/EntityPage.tsx
const ComponentOverviewContent = ({ entity }: { entity: Entity }) => (
<Grid container spacing={3} alignItems="stretch">
<Grid item md={4} sm={6}>
<EntityLinksCard entity={entity} />
// or ...
<EntityLinksCard entity={entity} cols={{ md: 2, lg: 3, xl: 4 }} />
</Grid>
</Grid>
);
```