import { DialogClose, DialogContent } from "@components/Dialog"; import * as DialogPrimitive from "@radix-ui/react-dialog"; import { ExclamationIcon } from "@heroicons/react/outline"; import React, { PropsWithChildren } from "react"; import { Button } from "@components/ui/Button"; export type ConfirmationDialogContentProps = { confirmBtnText?: string; cancelBtnText?: string; onConfirm: (event: React.MouseEvent) => void; title: string; variety?: "danger" /* no others yet */; }; export default function ConfirmationDialogContent(props: PropsWithChildren) { const { title, variety, confirmBtnText = "Confirm", cancelBtnText = "Cancel", onConfirm, children } = props; return (
{variety && (
{variety === "danger" && (
)}
)}
{title} {children}
); }