tasko/hooks/use-mobile-sidebar.ts
2024-02-14 21:30:10 -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 }),
}));