diff --git a/plugins/catalog/api-report.md b/plugins/catalog/api-report.md index ada173fd5d..82df851239 100644 --- a/plugins/catalog/api-report.md +++ b/plugins/catalog/api-report.md @@ -282,6 +282,8 @@ export const EntityLabelsCard: (props: EntityLabelsCardProps) => JSX.Element; // @public (undocumented) export interface EntityLabelsCardProps { + // (undocumented) + title?: string; // (undocumented) variant?: InfoCardVariants; } diff --git a/plugins/catalog/src/components/EntityLabelsCard/EntityLabelsCard.tsx b/plugins/catalog/src/components/EntityLabelsCard/EntityLabelsCard.tsx index e3bee02c43..500c651cc0 100644 --- a/plugins/catalog/src/components/EntityLabelsCard/EntityLabelsCard.tsx +++ b/plugins/catalog/src/components/EntityLabelsCard/EntityLabelsCard.tsx @@ -28,6 +28,7 @@ import { makeStyles, Typography } from '@material-ui/core'; /** @public */ export interface EntityLabelsCardProps { variant?: InfoCardVariants; + title?: string; } const useStyles = makeStyles(_ => ({ @@ -37,7 +38,7 @@ const useStyles = makeStyles(_ => ({ })); export const EntityLabelsCard = (props: EntityLabelsCardProps) => { - const { variant } = props; + const { variant, title } = props; const { entity } = useEntity(); const classes = useStyles(); @@ -59,7 +60,7 @@ export const EntityLabelsCard = (props: EntityLabelsCardProps) => { const labels = entity?.metadata?.labels; return ( - + {!labels || Object.keys(labels).length === 0 ? ( ) : (