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

13 lines
289 B
TypeScript

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