Tweak missing annotation emptystate (#2897)
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user