fix: make Alert colors scheme-aware using palette tokens for berry/ocean/craft/forest compatibility
This commit is contained in:
@@ -13,15 +13,16 @@ export function NotificationStack() {
|
||||
|
||||
return (
|
||||
<Stack
|
||||
spacing={1}
|
||||
spacing={1.5}
|
||||
sx={{
|
||||
position: 'fixed',
|
||||
bottom: 80,
|
||||
bottom: 88,
|
||||
left: '50%',
|
||||
transform: 'translateX(-50%)',
|
||||
zIndex: 2000,
|
||||
width: 'auto',
|
||||
maxWidth: 400,
|
||||
minWidth: 360,
|
||||
maxWidth: 440,
|
||||
}}
|
||||
>
|
||||
{notifications.map((n) => (
|
||||
@@ -31,41 +32,36 @@ export function NotificationStack() {
|
||||
autoHideDuration={n.autoHideDuration}
|
||||
onClose={() => dismissNotification(n.id)}
|
||||
anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }}
|
||||
sx={{
|
||||
'& .MuiSnackbarContent-root': {
|
||||
borderRadius: 12,
|
||||
border: '1px solid',
|
||||
borderColor: 'rgba(0,0,0,0.06)',
|
||||
bgcolor: 'background.paper',
|
||||
boxShadow: '0 4px 20px rgba(0,0,0,0.08)',
|
||||
},
|
||||
}}
|
||||
sx={{ position: 'static' }}
|
||||
>
|
||||
<Alert
|
||||
severity={n.type}
|
||||
variant="standard"
|
||||
onClose={() => dismissNotification(n.id)}
|
||||
sx={{
|
||||
bgcolor: 'transparent',
|
||||
border: 'none',
|
||||
boxShadow: 'none',
|
||||
p: 1.5,
|
||||
width: '100%',
|
||||
px: 2,
|
||||
py: 1.5,
|
||||
alignItems: 'center',
|
||||
'& .MuiAlert-icon': {
|
||||
padding: 0,
|
||||
py: 0.5,
|
||||
mr: 1.5,
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
},
|
||||
'& .MuiAlert-message': {
|
||||
padding: 0,
|
||||
py: 0.5,
|
||||
fontSize: '0.875rem',
|
||||
fontWeight: 600,
|
||||
lineHeight: 1.5,
|
||||
},
|
||||
'& .MuiAlert-action': {
|
||||
padding: 0,
|
||||
mr: 0,
|
||||
ml: 1,
|
||||
py: 0.5,
|
||||
pr: 0,
|
||||
ml: 1.5,
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
gap: 0.5,
|
||||
},
|
||||
}}
|
||||
action={
|
||||
@@ -79,11 +75,12 @@ export function NotificationStack() {
|
||||
navigate(n.actionPath!)
|
||||
}}
|
||||
sx={{
|
||||
fontWeight: 600,
|
||||
fontWeight: 700,
|
||||
fontSize: '0.8125rem',
|
||||
px: 1.5,
|
||||
py: 0.5,
|
||||
borderRadius: 8,
|
||||
whiteSpace: 'nowrap',
|
||||
color: 'success.main',
|
||||
'&:hover': {
|
||||
bgcolor: 'action.hover',
|
||||
|
||||
Reference in New Issue
Block a user