mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-27 02:42:25 +08:00
fix(component): mobile toast dark mode (#9142)
This commit is contained in:
@@ -1,8 +1,12 @@
|
|||||||
|
import { useTheme } from 'next-themes';
|
||||||
import { Toaster } from 'sonner';
|
import { Toaster } from 'sonner';
|
||||||
|
|
||||||
import { sonner } from './styles.css';
|
import { sonner } from './styles.css';
|
||||||
|
|
||||||
export function MobileNotificationCenter() {
|
export function MobileNotificationCenter() {
|
||||||
|
const theme = useTheme();
|
||||||
|
const resolvedTheme = theme.resolvedTheme as 'light' | 'dark';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Toaster
|
<Toaster
|
||||||
className={sonner}
|
className={sonner}
|
||||||
@@ -13,6 +17,7 @@ export function MobileNotificationCenter() {
|
|||||||
top: 'calc(env(safe-area-inset-top) + 16px)',
|
top: 'calc(env(safe-area-inset-top) + 16px)',
|
||||||
pointerEvents: 'auto',
|
pointerEvents: 'auto',
|
||||||
}}
|
}}
|
||||||
|
theme={resolvedTheme}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user