diff --git a/superset-frontend/src/components/ErrorMessage/BasicErrorAlert.tsx b/superset-frontend/src/components/ErrorMessage/BasicErrorAlert.tsx index ffc120d87aaf9..fdc61b889153c 100644 --- a/superset-frontend/src/components/ErrorMessage/BasicErrorAlert.tsx +++ b/superset-frontend/src/components/ErrorMessage/BasicErrorAlert.tsx @@ -51,17 +51,18 @@ interface BasicErrorAlertProps { export default function BasicErrorAlert({ body, - level, + level = 'error', title, }: BasicErrorAlertProps) { const theme = useTheme(); + const iconColor = theme.colors[level].base; return ( - {!level || level === 'error' ? ( - + {level === 'error' ? ( + ) : ( - + )} {title} diff --git a/superset-frontend/src/components/ErrorMessage/ErrorAlert.tsx b/superset-frontend/src/components/ErrorMessage/ErrorAlert.tsx index f47fc7fe2b60f..3340c8ad6d3e7 100644 --- a/superset-frontend/src/components/ErrorMessage/ErrorAlert.tsx +++ b/superset-frontend/src/components/ErrorMessage/ErrorAlert.tsx @@ -92,7 +92,7 @@ interface ErrorAlertProps { export default function ErrorAlert({ body, copyText, - level, + level = 'error', source = 'dashboard', subtitle, title, @@ -103,21 +103,16 @@ export default function ErrorAlert({ const [isBodyExpanded, setIsBodyExpanded] = useState(false); const isExpandable = ['explore', 'sqllab'].includes(source); + const iconColor = theme.colors[level].base; return (
- {!level || level === 'error' ? ( - + {level === 'error' ? ( + ) : ( - + )} {title} @@ -171,16 +166,10 @@ export default function ErrorAlert({ onHide={() => setIsModalOpen(false)} title={
- {!level || level === 'error' ? ( - + {level === 'error' ? ( + ) : ( - + )}
{title}