techdocs: make empty state output optional

Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
This commit is contained in:
MT Lewis
2024-09-16 12:01:58 +01:00
parent f66ee9c89f
commit 0e9dbf8d64
2 changed files with 5 additions and 9 deletions
+3 -1
View File
@@ -230,7 +230,9 @@ const _default: FrontendPlugin<
output: ConfigurableExtensionDataRef<
React_2.JSX.Element,
'core.reactElement',
{}
{
optional: true;
}
>;
inputs: {
[x: string]: ExtensionInput<
+2 -8
View File
@@ -37,9 +37,7 @@ import {
convertLegacyRouteRefs,
} from '@backstage/core-compat-api';
import { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha';
import { MissingAnnotationEmptyState } from '@backstage/plugin-catalog-react';
import { SearchResultListItemBlueprint } from '@backstage/plugin-search-react/alpha';
import { TECHDOCS_ANNOTATION } from '@backstage/plugin-techdocs-common';
import {
techdocsApiRef,
techdocsStorageApiRef,
@@ -189,12 +187,8 @@ const TechDocsEntityContentEmptyState = createExtension({
kind: 'empty-state',
name: 'entity-content',
attachTo: { id: 'entity-content:techdocs', input: 'emptyState' },
output: [coreExtensionData.reactElement],
factory: () => [
coreExtensionData.reactElement(
<MissingAnnotationEmptyState annotation={[TECHDOCS_ANNOTATION]} />,
),
],
output: [coreExtensionData.reactElement.optional()],
factory: () => [],
});
/** @alpha */