import { ExclamationIcon } from "@heroicons/react/outline"; import * as DialogPrimitive from "@radix-ui/react-dialog"; import React, { PropsWithChildren } from "react"; import { DialogClose, DialogContent } from "@components/Dialog"; 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}
); }