diff --git a/runtime-demo/index.html b/runtime-demo/index.html index 2391b2e..e52ee3d 100644 --- a/runtime-demo/index.html +++ b/runtime-demo/index.html @@ -39,6 +39,11 @@
+ diff --git a/src/components/notifications/notifications.module.css b/src/components/notifications/notifications.module.css index 8f9ee76..b5e3bb9 100644 --- a/src/components/notifications/notifications.module.css +++ b/src/components/notifications/notifications.module.css @@ -1,6 +1,6 @@ .root { position: fixed; - top: var(--mantine-spacing-lg); + top: calc(env(safe-area-inset-top) + var(--mantine-spacing-lg)); right: var(--mantine-spacing-xs); z-index: var(--mantine-z-index-popover); margin-left: var(--mantine-spacing-md); diff --git a/src/components/notifications/sliding-notification.tsx b/src/components/notifications/sliding-notification.tsx index 466e61b..7c9cfc6 100644 --- a/src/components/notifications/sliding-notification.tsx +++ b/src/components/notifications/sliding-notification.tsx @@ -30,14 +30,11 @@ export default function SlidingNotification({ notification }: SlidingNotificatio const closeTimeoutId = setTimeout(() => { setOpened(false); - }, OPEN_DELAY_MS + notification.duration); - setTimeout( - () => { + setTimeout(() => { dispatch(removeNotification(notification.id)); - }, - OPEN_DELAY_MS + notification.duration + ANIMATION_DURATION_MS - ); + }, ANIMATION_DURATION_MS); + }, OPEN_DELAY_MS + notification.duration); return () => { clearTimeout(closeTimeoutId);