feat(techdocs): use entity title as label in header

Signed-off-by: Phil Kuang <pkuang@factset.com>
This commit is contained in:
Phil Kuang
2022-06-01 10:59:50 -04:00
parent d76cabf329
commit d047d81295
4 changed files with 12 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-techdocs': patch
---
Use entity title as label in `TechDocsReaderPageHeader` if available
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-techdocs-addons-test-utils': patch
---
Update default mock
@@ -82,7 +82,7 @@ type TechDocsAddonTesterOptions = {
const defaultOptions: TechDocsAddonTesterOptions = {
dom: <></>,
entity: {},
entity: { metadata: { name: '' } },
metadata: {},
componentId: 'docs',
apis: [],
@@ -110,6 +110,7 @@ export const TechDocsReaderPageHeader = (
<EntityRefLink
color="inherit"
entityRef={entityRef}
title={entityMetadata?.metadata.title}
defaultKind="Component"
/>
}