diff --git a/.changeset/purple-pants-speak.md b/.changeset/purple-pants-speak.md new file mode 100644 index 0000000000..b46c4b991f --- /dev/null +++ b/.changeset/purple-pants-speak.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog': patch +--- + +Fixed missing margins for entity warning content area on catalog entity page in NFS. diff --git a/plugins/catalog/src/alpha/DefaultEntityContentLayout.tsx b/plugins/catalog/src/alpha/DefaultEntityContentLayout.tsx index 77b84af275..7b5b6fbcbc 100644 --- a/plugins/catalog/src/alpha/DefaultEntityContentLayout.tsx +++ b/plugins/catalog/src/alpha/DefaultEntityContentLayout.tsx @@ -15,7 +15,6 @@ */ import { Fragment } from 'react'; -import Grid from '@material-ui/core/Grid'; import { makeStyles, Theme } from '@material-ui/core/styles'; import { EntityContentLayoutProps } from '@backstage/plugin-catalog-react/alpha'; import { EntitySwitch } from '../components/EntitySwitch'; @@ -42,6 +41,15 @@ const useStyles = makeStyles< flexFlow: 'column nowrap', gap: theme.spacing(3), }, + warningArea: { + display: 'grid', + gap: theme.spacing(2), + marginBottom: theme.spacing(3), + '&:empty': { + marginBottom: 0, + display: 'none', + }, + }, mainContent: { display: 'flex', flexFlow: 'column', @@ -120,34 +128,6 @@ const useStyles = makeStyles< }, })); -const entityWarningContent = ( - <> - - - - - - - - - - - - - - - - - - - - - - - - -); - export function DefaultEntityContentLayout(props: EntityContentLayoutProps) { const { cards } = props; @@ -165,7 +145,25 @@ export function DefaultEntityContentLayout(props: EntityContentLayoutProps) { return ( <> - {entityWarningContent} +
+ + + + + + + + + + + + + + + + + +
{infoCards.length > 0 ? (