plugin-techdocs: add group filtering support to EntityListDocsGrid

Signed-off-by: Simon Ninon <sninon@pagerduty.com>
This commit is contained in:
Simon Ninon
2022-09-19 15:11:52 -07:00
parent 4a6143a3be
commit 5691baea69
5 changed files with 449 additions and 7 deletions
+25
View File
@@ -0,0 +1,25 @@
---
'@backstage/plugin-techdocs': minor
---
Add ability to configure filters when using EntityListDocsGrid
The following example will render two sections of cards grid:
- One section for documentations tagged as `recommended`
- One section for documentations tagged as `runbook`
```js
<EntityListDocsGrid groups={{[
{
title: "Recommended Documentation",
filterPredicate: entity =>
entity?.metadata?.tags?.includes('recommended') ?? false,
},
{
title: "RunBooks Documentation",
filterPredicate: entity =>
entity?.metadata?.tags?.includes('runbook') ?? false,
}
]}} />
```