diff --git a/.changeset/fresh-beans-call.md b/.changeset/fresh-beans-call.md new file mode 100644 index 0000000000..7327f9a3c9 --- /dev/null +++ b/.changeset/fresh-beans-call.md @@ -0,0 +1,5 @@ +--- +'@backstage/core-components': patch +--- + +Add ability to customize `Read More` destination with `readMoreUrl` prop for `MissingAnnotationEmptyState` component. diff --git a/packages/core-components/src/components/EmptyState/MissingAnnotationEmptyState.tsx b/packages/core-components/src/components/EmptyState/MissingAnnotationEmptyState.tsx index 61131bad9b..8d8416a241 100644 --- a/packages/core-components/src/components/EmptyState/MissingAnnotationEmptyState.tsx +++ b/packages/core-components/src/components/EmptyState/MissingAnnotationEmptyState.tsx @@ -37,6 +37,7 @@ spec: type Props = { annotation: string; + readMoreUrl?: string; }; export type MissingAnnotationEmptyStateClassKey = 'code'; @@ -53,7 +54,10 @@ const useStyles = makeStyles( ); export function MissingAnnotationEmptyState(props: Props) { - const { annotation } = props; + const { annotation, readMoreUrl } = props; + const url = + readMoreUrl || + 'https://backstage.io/docs/features/software-catalog/well-known-annotations'; const classes = useStyles(); const description = ( <> @@ -81,11 +85,7 @@ export function MissingAnnotationEmptyState(props: Props) { customStyle={{ background: 'inherit', fontSize: '115%' }} /> -