tasko/hooks/use-mobile-sidebar.ts
2024-02-15 20:49:19 -05:00

13 lines
304 B
TypeScript

import { create } from 'zustand';
type MobileSidebarStore = {
isOpen: boolean;
onOpen: () => void;
onClose: () => void;
};
export const useMobileSidebar = create<MobileSidebarStore>((set) => ({
isOpen: false,
onOpen: () => set({ isOpen: true }),
onClose: () => set({ isOpen: false }),
}));