Skip to content

feat: redesign error alert #4403

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Oct 7, 2022
Prev Previous commit
Next Next commit
fixed height issue
  • Loading branch information
Kira-Pilot committed Oct 6, 2022
commit f0175da368a9a92b7a503f9ebd4aaff87455e309
9 changes: 5 additions & 4 deletions site/src/components/AlertBanner/AlertBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const AlertBanner: FC<AlertBannerProps> = ({
justifyContent="space-between"
>
<Stack direction="row" spacing={1}>
<div className={classes.iconContainer}>{severityConstants[severity].icon}</div>
{severityConstants[severity].icon}
<Stack spacing={0}>
{alertMessage}
{detail && (
Expand Down Expand Up @@ -84,8 +84,9 @@ const useStyles = makeStyles<Theme, StyleProps>((theme) => ({
borderRadius: theme.shape.borderRadius,
padding: `${theme.spacing(1)}px ${theme.spacing(2)}px`,
backgroundColor: `${colors.gray[16]}`,
}),
iconContainer: (props) => ({
marginTop: props.hasDetail ? "8px" : "unset",

"& svg": {
marginTop: props.hasDetail ? "8px" : "inherit",
},
}),
}))