this repo has no description
1import type { ComputedRef, Ref } from 'vue'
2import { createContext } from 'reka-ui'
3
4export const SIDEBAR_COOKIE_NAME = 'sidebar_state'
5export const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7
6export const SIDEBAR_WIDTH = '16rem'
7export const SIDEBAR_WIDTH_MOBILE = '18rem'
8export const SIDEBAR_WIDTH_ICON = '3rem'
9export const SIDEBAR_KEYBOARD_SHORTCUT = 'b'
10
11export const [useSidebar, provideSidebarContext] = createContext<{
12 state: ComputedRef<'expanded' | 'collapsed'>
13 open: Ref<boolean>
14 setOpen: (value: boolean) => void
15 isMobile: Ref<boolean>
16 openMobile: Ref<boolean>
17 setOpenMobile: (value: boolean) => void
18 toggleSidebar: () => void
19}>('Sidebar')