fix(component): mobile toast dark mode (#9142)

This commit is contained in:
CatsJuice 2024-12-16 04:31:12 +00:00
parent 729c37977e
commit 87bbcae5e2
No known key found for this signature in database
GPG Key ID: 1C1E76924FAFDDE4

View File

@ -1,8 +1,12 @@
import { useTheme } from 'next-themes';
import { Toaster } from 'sonner';
import { sonner } from './styles.css';
export function MobileNotificationCenter() {
const theme = useTheme();
const resolvedTheme = theme.resolvedTheme as 'light' | 'dark';
return (
<Toaster
className={sonner}
@ -13,6 +17,7 @@ export function MobileNotificationCenter() {
top: 'calc(env(safe-area-inset-top) + 16px)',
pointerEvents: 'auto',
}}
theme={resolvedTheme}
/>
);
}