import React from 'react'; import { AlertCircle, X } from 'lucide-react'; export interface ConfirmDialogProps { isOpen: boolean; title?: string; message: string; confirmText?: string; cancelText?: string; danger?: boolean; onConfirm: () => void; onCancel: () => void; } const ConfirmDialog: React.FC = ({ isOpen, title = '确认操作', message, confirmText = '确定', cancelText = '取消', danger = false, onConfirm, onCancel, }) => { if (!isOpen) return null; return (
{/* 背景遮罩 */}
{/* 对话框 */}
{/* 关闭按钮 */} {/* 内容 */}

{title}

{message}

{/* 按钮 */}
); }; export default ConfirmDialog;