mirror of
https://github.com/inventree/InvenTree.git
synced 2026-09-01 17:51:23 +00:00
Observe color mode
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user