import styles from './ConfirmModal.module.css'; interface ConfirmModalProps { open: boolean; title: string; message: string; confirmText?: string; cancelText?: string; danger?: boolean; onConfirm: () => void; onCancel: () => void; } export function ConfirmModal({ open, title, message, confirmText = '确认', cancelText = '取消', danger, onConfirm, onCancel }: ConfirmModalProps) { if (!open) return null; return (
{ if (e.target === e.currentTarget) onCancel(); }}>

{title}

{message}

); }