fix close icon placement for toasts without title

This commit is contained in:
Alex Holliday committed 2025-07-16 12:51:52 -07:00
1 parent c58801f6f7
commit 4cd5cd4bae
1 file changed
+17 -4
+17 -4
View File
@@ -48,12 +48,25 @@ const Toast = ({ variant, title, body, onClick, hasDismiss, hasIcon }) => {
{title} {title}
</Typography> </Typography>
)} )}
<IconButton onClick={onClick}> {title && (
<CloseIcon /> <IconButton onClick={onClick}>
</IconButton> <CloseIcon />
</IconButton>
)}
</Stack> </Stack>
<ToastBody body={body} /> <Stack
direction="row"
gap={theme.spacing(2)}
alignItems="center"
>
<ToastBody body={body} />
{!title && (
<IconButton onClick={onClick}>
<CloseIcon />
</IconButton>
)}
</Stack>
{hasDismiss && ( {hasDismiss && (
<Button <Button
variant="text" variant="text"