UNPKG

@premieroctet/next-admin

Version:

Next-Admin provides a customizable and turnkey admin dashboard for applications built with Next.js and powered by the Prisma ORM. It aims to simplify the development process by providing a turnkey admin system that can be easily integrated into your proje

15 lines (14 loc) 359 B
import { useState } from "react"; const useDisclosure = ()=>{ const [isOpen, setIsOpen] = useState(false); const onOpen = ()=>setIsOpen(true); const onClose = ()=>setIsOpen(false); const onToggle = ()=>setIsOpen((prev)=>!prev); return { isOpen, onOpen, onClose, onToggle }; }; export { useDisclosure };