fix: use theme callback in sx to force Alert icon/text color to primary.main; add backdrop-filter + shadow

This commit is contained in:
Kirill
2026-05-27 23:35:22 +05:00
parent 8e1f977d43
commit 9aea74db96
2 changed files with 6 additions and 7 deletions
@@ -31,20 +31,23 @@ export function NotificationStack() {
severity={n.type} severity={n.type}
variant="standard" variant="standard"
onClose={() => dismissNotification(n.id)} onClose={() => dismissNotification(n.id)}
sx={{ sx={(theme) => ({
width: '100%', width: '100%',
minWidth: 360, minWidth: 360,
maxWidth: 440, maxWidth: 440,
px: 2, px: 2,
py: 1.5, py: 1.5,
alignItems: 'center', alignItems: 'center',
color: `${theme.palette.primary.main} !important`,
boxShadow: '0 4px 16px rgba(0,0,0,0.08)', boxShadow: '0 4px 16px rgba(0,0,0,0.08)',
WebkitBackdropFilter: 'blur(8px)',
backdropFilter: 'blur(8px)', backdropFilter: 'blur(8px)',
'& .MuiAlert-icon': { '& .MuiAlert-icon': {
py: 0.5, py: 0.5,
mr: 1.5, mr: 1.5,
display: 'flex', display: 'flex',
alignItems: 'center', alignItems: 'center',
color: `${theme.palette.primary.main} !important`,
}, },
'& .MuiAlert-message': { '& .MuiAlert-message': {
py: 0.5, py: 0.5,
@@ -60,7 +63,7 @@ export function NotificationStack() {
alignItems: 'center', alignItems: 'center',
gap: 1, gap: 1,
}, },
}} })}
action={ action={
<> <>
{n.actionLabel && n.actionPath && ( {n.actionLabel && n.actionPath && (
@@ -87,11 +90,7 @@ export function NotificationStack() {
{n.actionLabel} {n.actionLabel}
</Button> </Button>
)} )}
<IconButton <IconButton size="small" onClick={() => dismissNotification(n.id)} sx={{ color: 'primary.main' }}>
size="small"
onClick={() => dismissNotification(n.id)}
sx={{ color: 'primary.main' }}
>
<CloseIcon fontSize="small" /> <CloseIcon fontSize="small" />
</IconButton> </IconButton>
</> </>
Binary file not shown.