import { Fragment } from 'react'; import { Dialog, Transition } from '@headlessui/react'; export default function Modal({ children, show = false, maxWidth = '2xl', closeable = true, onClose = () => {} }) { const close = () => { if (closeable) { onClose(); } }; const maxWidthClass = { sm: 'sm:max-w-sm', md: 'sm:max-w-md', lg: 'sm:max-w-lg', xl: 'sm:max-w-xl', '2xl': 'sm:max-w-2xl', }[maxWidth]; return (
{children}
); }