fix close icon placement for toasts without title

This commit is contained in:
Alex Holliday
2025-07-16 12:51:52 -07:00
parent c58801f6f7
commit 4cd5cd4bae

View File

@@ -48,12 +48,25 @@ const Toast = ({ variant, title, body, onClick, hasDismiss, hasIcon }) => {
{title}
</Typography>
)}
<IconButton onClick={onClick}>
<CloseIcon />
</IconButton>
{title && (
<IconButton onClick={onClick}>
<CloseIcon />
</IconButton>
)}
</Stack>
<ToastBody body={body} />
<Stack
direction="row"
gap={theme.spacing(2)}
alignItems="center"
>
<ToastBody body={body} />
{!title && (
<IconButton onClick={onClick}>
<CloseIcon />
</IconButton>
)}
</Stack>
{hasDismiss && (
<Button
variant="text"