Dark mode toggle in settings

This commit is contained in:
Ben Grant 2021-04-12 12:09:10 +10:00
parent 5fa0370b86
commit 01a9b55b6a
5 changed files with 23 additions and 3 deletions

View file

@ -5,9 +5,11 @@ export const useSettingsStore = create(persist(
set => ({
weekStart: 0,
timeFormat: '12h',
theme: 'System',
setWeekStart: weekStart => set({ weekStart }),
setTimeFormat: timeFormat => set({ timeFormat }),
setTheme: theme => set({ theme }),
}),
{ name: 'crabfit-settings' },
));