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