Add 'toggle dark mode' option to settings dialog
This commit is contained in:
parent
cb7f70000e
commit
657ffec62e
@ -104,7 +104,21 @@ function SettingsDialog({ settings, setSettings }: Props) {
|
|||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
<Label htmlFor="app-theme">
|
||||||
|
<div>App Theme</div>
|
||||||
|
</Label>
|
||||||
|
<div>
|
||||||
|
<button
|
||||||
|
className="flex rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50t"
|
||||||
|
onClick={() => {
|
||||||
|
document.querySelector("div.mt-2")?.classList.toggle("dark"); // enable dark mode for sidebar
|
||||||
|
document.body.classList.toggle("dark");
|
||||||
|
document.querySelector('div[role="presentation"]')?.classList.toggle("dark"); // enable dark mode for upload container
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Toggle dark mode
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
<Label htmlFor="editor-theme">
|
<Label htmlFor="editor-theme">
|
||||||
<div>Editor Theme</div>
|
<div>Editor Theme</div>
|
||||||
</Label>
|
</Label>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user