import { Modal } from './Modal' import { Button } from './Button' import type { ReactNode } from 'react' type ConfirmDialogProps = { open: boolean onClose: () => void onConfirm: () => void | Promise title: string body: ReactNode confirmLabel: string cancelLabel: string confirmVariant?: 'primary' | 'danger' loading?: boolean } export function ConfirmDialog({ open, onClose, onConfirm, title, body, confirmLabel, cancelLabel, confirmVariant = 'danger', loading = false, }: ConfirmDialogProps) { return ( {} : onClose} title={title} width={460} footer={( <> )} > {typeof body === 'string' ? (

{body}

) : body}
) }