Observe color mode

This commit is contained in:
Oliver Walters
2026-05-25 05:43:56 +00:00
parent 488f558e6a
commit 29202f6147
@@ -29,7 +29,8 @@ import {
Stack, Stack,
Tabs, Tabs,
Text, Text,
Tooltip Tooltip,
useMantineColorScheme
} from '@mantine/core'; } from '@mantine/core';
import { import {
IconCirclePlus, IconCirclePlus,
@@ -105,6 +106,7 @@ export default function NotesEditor({
const api = useApi(); const api = useApi();
const user = useUserState(); const user = useUserState();
const [language] = useLocalState(useShallow((s) => [s.language])); const [language] = useLocalState(useShallow((s) => [s.language]));
const { colorScheme } = useMantineColorScheme();
const editor = useCreateBlockNote({ const editor = useCreateBlockNote({
dictionary: dictionary:
@@ -359,6 +361,7 @@ export default function NotesEditor({
<BlockNoteView <BlockNoteView
editor={editor} editor={editor}
editable={canEdit} editable={canEdit}
theme={colorScheme === 'dark' ? 'dark' : 'light'}
style={{ minHeight: '400px' }} style={{ minHeight: '400px' }}
/> />
</Stack> </Stack>