import { Transition } from "@headlessui/react"; import { Fragment, ReactNode, useState } from "react"; import { useEscapeKeypress } from "../../../utils/shared/KeypressUtils"; import clsx from "clsx"; type size = "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "full"; interface Props { title?: string; size?: size; paddingContent?: string; paddingY?: string; content?: ReactNode; footer?: ReactNode; children?: ReactNode; onClose: () => void; } export default function SlideOver({ title = "", size = "md", paddingContent = "px-4 sm:px-6", paddingY = "py-6", onClose, content, footer }: Props) { const [open] = useState(true); useEscapeKeypress(onClose); return (