fix: sync color scheme with excalidraw

This commit is contained in:
Philipinho
2024-10-29 19:33:08 +00:00
parent ba32e42ece
commit 31feb38def

View File

@ -73,7 +73,7 @@ export default function ExcalidrawView(props: NodeViewProps) {
elements: excalidrawAPI?.getSceneElements(), elements: excalidrawAPI?.getSceneElements(),
appState: { appState: {
exportEmbedScene: true, exportEmbedScene: true,
exportWithDarkMode: computedColorScheme == 'light' ? false : true, exportWithDarkMode: computedColorScheme != 'light',
}, },
files: excalidrawAPI?.getFiles(), files: excalidrawAPI?.getFiles(),
}); });
@ -147,6 +147,7 @@ export default function ExcalidrawView(props: NodeViewProps) {
...excalidrawData, ...excalidrawData,
scrollToContent: true, scrollToContent: true,
}} }}
theme={computedColorScheme}
/> />
</Suspense> </Suspense>
</div> </div>
@ -202,7 +203,7 @@ export default function ExcalidrawView(props: NodeViewProps) {
</ActionIcon> </ActionIcon>
<Text component="span" size="lg" c="dimmed"> <Text component="span" size="lg" c="dimmed">
Double-click to edit excalidraw diagram Double-click to edit Excalidraw diagram
</Text> </Text>
</div> </div>
</Card> </Card>