Add isEntityWith helper method to EntitySwitch conditions

This will make it easier to conditionally show content for a given
entity based on the `spec.type` field beyond just component entities
(e.g. api, group and resource, all have a spec.type field)

Signed-off-by: Brian Phillips <28457+brianphillips@users.noreply.github.com>
This commit is contained in:
Brian Phillips
2023-03-14 15:09:52 -05:00
parent 8f72566485
commit fc6cab4eb4
4 changed files with 54 additions and 17 deletions
+1 -1
View File
@@ -480,7 +480,7 @@ function isKind(kind: string) {
```
The `@backstage/catalog` plugin provides a couple of built-in conditions,
`isKind`, `isComponentType`, and `isNamespace`.
`isKind`, `isComponentType`, `isResourceType`, `isEntityWith`, and `isNamespace`.
In addition to the `EntitySwitch` component, the catalog plugin also exports a
new `EntityLayout` component. It is a tweaked version and replacement for the