diff --git a/app/components/ConfirmModal.jsx b/app/components/ConfirmModal.jsx index e2c9fbf..2032514 100644 --- a/app/components/ConfirmModal.jsx +++ b/app/components/ConfirmModal.jsx @@ -15,20 +15,31 @@ export default function ConfirmModal({ onConfirm, onCancel, confirmText = '确定删除', + icon, + confirmVariant = 'danger', // 'danger' | 'primary' | 'secondary' }) { const handleOpenChange = (open) => { if (!open) onCancel(); }; + const confirmButtonToneClass = + confirmVariant === 'primary' + ? 'button' + : confirmVariant === 'secondary' + ? 'button secondary' + : 'button danger'; + return ( - + {icon || ( + + )} {title} @@ -44,7 +55,7 @@ export default function ConfirmModal({