mirror of
https://github.com/simstudioai/sim.git
synced 2026-04-28 03:00:29 -04:00
dark mode (#45)
* dark mode * fix(ui): cleaned up dark mode --------- Co-authored-by: Emir Karabeg <emirkarabeg@berkeley.edu>
This commit is contained in:
@@ -4,11 +4,13 @@ import { devtools, persist } from 'zustand/middleware'
|
||||
interface General {
|
||||
isAutoConnectEnabled: boolean
|
||||
isDebugModeEnabled: boolean
|
||||
theme: 'light' | 'dark'
|
||||
}
|
||||
|
||||
interface GeneralActions {
|
||||
toggleAutoConnect: () => void
|
||||
toggleDebugMode: () => void
|
||||
setTheme: (theme: 'light' | 'dark') => void
|
||||
}
|
||||
|
||||
type GeneralStore = General & GeneralActions
|
||||
@@ -19,9 +21,11 @@ export const useGeneralStore = create<GeneralStore>()(
|
||||
(set) => ({
|
||||
isAutoConnectEnabled: true,
|
||||
isDebugModeEnabled: false,
|
||||
theme: 'light',
|
||||
toggleAutoConnect: () =>
|
||||
set((state) => ({ isAutoConnectEnabled: !state.isAutoConnectEnabled })),
|
||||
toggleDebugMode: () => set((state) => ({ isDebugModeEnabled: !state.isDebugModeEnabled })),
|
||||
setTheme: (theme: 'light' | 'dark') => set({ theme }),
|
||||
}),
|
||||
{
|
||||
name: 'general-settings',
|
||||
|
||||
Reference in New Issue
Block a user