Tweak missing annotation emptystate (#2897)

This commit is contained in:
Stefan Ålund
2020-10-14 16:43:39 +02:00
committed by GitHub
parent 3533237c5f
commit 179a960b15
2 changed files with 8 additions and 2 deletions
@@ -33,7 +33,7 @@ const useStyles = makeStyles(theme => ({
type Props = {
title: string;
description?: string;
description?: string | JSX.Element;
missing: 'field' | 'info' | 'content' | 'data';
action?: JSX.Element;
};
@@ -48,11 +48,17 @@ const useStyles = makeStyles<BackstageTheme>(theme => ({
export const MissingAnnotationEmptyState = ({ annotation }: Props) => {
const classes = useStyles();
const description = (
<Typography>
The <code>{annotation}</code> annotation is missing. You need to add the
annotation to your component if you want to enable this tool.
</Typography>
);
return (
<EmptyState
missing="field"
title="Missing Annotation"
description={`The "${annotation}" annotation is missing. You need to add the annotation to your component if you want to enable this tool for it.`}
description={description}
action={
<>
<Typography variant="body1">