/** * @deprecated file * All new changes should be made to the V2 file in * `/packages/ui/v2/core/ConfirmationDialogContent.tsx` */ import * as DialogPrimitive from "@radix-ui/react-dialog"; import React, { PropsWithChildren, ReactNode } from "react"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Button } from "@calcom/ui/Button"; import { DialogClose, DialogContent } from "@calcom/ui/Dialog"; import { Icon } from "@calcom/ui/Icon"; export type ConfirmationDialogContentProps = { confirmBtn?: ReactNode; confirmBtnText?: string; cancelBtnText?: string; isLoading?: boolean; loadingText?: string; onConfirm?: (event: React.MouseEvent) => void; title: string; variety?: "danger" | "warning" | "success"; }; /** * @deprecated file * All new changes should be made to the V2 file in * `/packages/ui/v2/core/ConfirmationDialogContent.tsx` */ export default function ConfirmationDialogContent(props: PropsWithChildren) { const { t } = useLocale(); const { title, variety, confirmBtn = null, confirmBtnText = t("confirm"), cancelBtnText = t("cancel"), loadingText = t("loading"), isLoading = false, onConfirm, children, } = props; return (
{variety && (
{variety === "danger" && (
)} {variety === "warning" && (
)} {variety === "success" && (
)}
)}
{title} {children}
{confirmBtn || ( )}
); }