import React from 'react'; import { AlertTriangle, Info } from 'lucide-react'; interface ConfirmModalProps { isOpen: boolean; onClose: () => void; onConfirm: () => void; title?: string; message: string; confirmText?: string; cancelText?: string; isDanger?: boolean; type?: 'confirm' | 'alert'; } export const ConfirmModal: React.FC = ({ isOpen, onClose, onConfirm, title = "提示", message, confirmText = "确定", cancelText = "取消", isDanger = false, type = 'confirm' }) => { if (!isOpen) return null; const handleConfirm = () => { onConfirm(); onClose(); }; return (
{isDanger ? : }

{title}

{message}

{type === 'confirm' && ( )}
); };