mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-30 20:29:07 +00:00
fixup! ♻️(frontend) harden PiP notifications stacking and dedupe
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
|||||||
toastQueue,
|
toastQueue,
|
||||||
type ToastData,
|
type ToastData,
|
||||||
} from '@/features/notifications/components/ToastProvider'
|
} from '@/features/notifications/components/ToastProvider'
|
||||||
|
import { StyledToastContainer } from '@/features/notifications/components/Toast'
|
||||||
import { PipToastBody } from './PipToastBody'
|
import { PipToastBody } from './PipToastBody'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -32,7 +33,11 @@ export const PipNotificationOverlay = () => {
|
|||||||
aria-live="polite"
|
aria-live="polite"
|
||||||
>
|
>
|
||||||
{toasts.map((toast) => (
|
{toasts.map((toast) => (
|
||||||
<ToastCard key={toast.key} aria-atomic="true">
|
<StyledToastContainer
|
||||||
|
key={toast.key}
|
||||||
|
aria-atomic="true"
|
||||||
|
css={{ margin: 0, marginLeft: 0, display: 'flex', alignItems: 'center', paddingRight: '0.25rem' }}
|
||||||
|
>
|
||||||
<PipToastBody toast={toast} />
|
<PipToastBody toast={toast} />
|
||||||
<Button
|
<Button
|
||||||
square
|
square
|
||||||
@@ -43,7 +48,7 @@ export const PipNotificationOverlay = () => {
|
|||||||
>
|
>
|
||||||
<RiCloseLine size={16} color="white" aria-hidden="true" />
|
<RiCloseLine size={16} color="white" aria-hidden="true" />
|
||||||
</Button>
|
</Button>
|
||||||
</ToastCard>
|
</StyledToastContainer>
|
||||||
))}
|
))}
|
||||||
</Region>
|
</Region>
|
||||||
)
|
)
|
||||||
@@ -59,21 +64,3 @@ const Region = styled('div', {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const ToastCard = styled('div', {
|
|
||||||
base: {
|
|
||||||
display: 'flex',
|
|
||||||
alignItems: 'center',
|
|
||||||
gap: '0.25rem',
|
|
||||||
maxWidth: '100%',
|
|
||||||
backgroundColor: 'greyscale.700',
|
|
||||||
color: 'white',
|
|
||||||
borderRadius: '6px',
|
|
||||||
boxShadow:
|
|
||||||
'rgba(0, 0, 0, 0.4) 0px 2px 6px 0px, rgba(0, 0, 0, 0.25) 0px 4px 12px 2px',
|
|
||||||
paddingRight: '0.25rem',
|
|
||||||
animation: 'fade 200ms',
|
|
||||||
'@media (prefers-reduced-motion: reduce)': {
|
|
||||||
animation: 'none',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|||||||
Reference in New Issue
Block a user