mirror of
https://github.com/FranP-code/Reflecto.git
synced 2025-10-13 00:43:31 +00:00
feat: enhance Tldraw component with onMount user preferences for dark mode
This commit is contained in:
@@ -30,7 +30,12 @@ function SpaceRoute() {
|
||||
|
||||
return (
|
||||
<div className="mx-4 mt-4" style={{ position: "relative", inset: 0 }}>
|
||||
<Tldraw inferDarkMode persistenceKey={persistenceKey} />
|
||||
<Tldraw
|
||||
onMount={(editor) => {
|
||||
editor.user.updateUserPreferences({ colorScheme: "dark" });
|
||||
}}
|
||||
persistenceKey={persistenceKey}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user