mirror of
https://github.com/apache/superset.git
synced 2026-04-27 20:14:54 +00:00
fix: error alert levels again (#17027)
This commit is contained in:
@@ -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 (
|
||||
<StyledContainer level={level} role="alert">
|
||||
{!level || level === 'error' ? (
|
||||
<Icons.ErrorSolid iconColor={theme.colors.error.base} />
|
||||
{level === 'error' ? (
|
||||
<Icons.ErrorSolid iconColor={iconColor} />
|
||||
) : (
|
||||
<Icons.WarningSolid iconColor={theme.colors[level].base} />
|
||||
<Icons.WarningSolid iconColor={iconColor} />
|
||||
)}
|
||||
<StyledContent>
|
||||
<StyledTitle>{title}</StyledTitle>
|
||||
|
||||
Reference in New Issue
Block a user