import { Dialog, Transition } from "@headlessui/react"; import { Button } from "~/components/Button"; import { Fragment } from "react"; interface Props { text: string; title: string; open: boolean; onClose: () => void; onOk?: () => void; okText?: string; okColor?: string; onCancel?: () => void; cancelText?: string; } export const ConfirmationModal = ({ text, title, open, onClose, onOk, okText = "OK", okColor = "bg-brand-success", onCancel, cancelText = "Cancel", }: Props) => { return (
{title}
{text}
{!!onCancel && ( )} {!!onOk && ( )}
); };