Observe color mode

This commit is contained in:
Oliver Walters 2026-05-25 05:43:56 +00:00
parent 488f558e6a
commit 29202f6147
1 changed files with 4 additions and 1 deletions

View File

@ -29,7 +29,8 @@ import {
Stack,
Tabs,
Text,
Tooltip
Tooltip,
useMantineColorScheme
} from '@mantine/core';
import {
IconCirclePlus,
@ -105,6 +106,7 @@ export default function NotesEditor({
const api = useApi();
const user = useUserState();
const [language] = useLocalState(useShallow((s) => [s.language]));
const { colorScheme } = useMantineColorScheme();
const editor = useCreateBlockNote({
dictionary:
@ -359,6 +361,7 @@ export default function NotesEditor({
<BlockNoteView
editor={editor}
editable={canEdit}
theme={colorScheme === 'dark' ? 'dark' : 'light'}
style={{ minHeight: '400px' }}
/>
</Stack>