Skip to content

Commit

Permalink
feat: add sidebars_state store
Browse files Browse the repository at this point in the history
  • Loading branch information
buhodev committed Oct 31, 2022
1 parent 0b5fdd3 commit 656eb0c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/components/buhodev/stores/sidebars_state.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { writable } from '@components/buhodev/stores/localStorage'

export const isSidebarOpen = writable('isSidebarOpen', true)
export const isHistoryOpen = writable('isHistoryOpen', true)

export const toggleSidebar = () => {
isSidebarOpen.update((state) => !state)
}

export const toggleHistory = () => {
isHistoryOpen.update((state) => !state)
}

0 comments on commit 656eb0c

Please sign in to comment.