import { ReactNode, Fragment } from "react"; import { Dialog, Transition } from "@headlessui/react"; import clsx from "clsx"; interface Props { className?: string; children: ReactNode; open: boolean; setOpen: React.Dispatch>; size?: "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "full"; padding?: "none" | "sm"; position?: 0 | 1 | 2 | 3 | 4 | 5; } export default function Modal({ className, children, open, setOpen, size = "3xl", padding = "sm", position = 2 }: Props) { function onClose() { setOpen(false); } return (
{/* This element is to trick the browser into centering the modal contents. */}
{children}
); }