/* legacy and soon deprecated, please refactor to use only */ import { Fragment, ReactNode } from "react"; import { Dialog, Transition } from "@headlessui/react"; import { CheckIcon, InformationCircleIcon } from "@heroicons/react/outline"; import classNames from "@lib/classNames"; export default function Modal(props: { heading: ReactNode; description: ReactNode; handleClose: () => void; open: boolean; variant?: "success" | "warning"; }) { const { variant = "success" } = props; return (
{/* This element is to trick the browser into centering the modal contents. */}
{variant === "success" && (
{props.heading}

{props.description}

); }