import React from 'react'; import { CloseIcon } from './icons'; // Assuming CloseIcon can be used for a general "cancel" or is styled appropriately interface ConfirmModalProps { isOpen: boolean; title: string; message: string | React.ReactNode; confirmText?: string; cancelText?: string; onConfirm: () => void; onCancel: () => void; isConfirmDestructive?: boolean; // Optional: to style confirm button differently for destructive actions } const ConfirmModal: React.FC = ({ isOpen, title, message, confirmText = 'Confirm', cancelText = 'Cancel', onConfirm, onCancel, isConfirmDestructive = false, }) => { if (!isOpen) return null; return (

{title}

{typeof message === 'string' ?

{message}

: message}
); }; export default ConfirmModal;