From e443a4d19b495abfc4380ce10e75f0d41ed293e8 Mon Sep 17 00:00:00 2001 From: 15945162479 <15945162479@qq.com> Date: Sat, 13 Dec 2025 14:46:11 +0800 Subject: [PATCH] Add File --- src/elderly/components/ConfirmDialog.tsx | 41 ++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/elderly/components/ConfirmDialog.tsx diff --git a/src/elderly/components/ConfirmDialog.tsx b/src/elderly/components/ConfirmDialog.tsx new file mode 100644 index 0000000..f3cf899 --- /dev/null +++ b/src/elderly/components/ConfirmDialog.tsx @@ -0,0 +1,41 @@ +import React from 'react'; +import { AlertTriangle } from 'lucide-react'; + +interface ConfirmDialogProps { + message: string; + onConfirm: () => void; + onCancel: () => void; +} + +/** + * 老人友好的确认对话框 + * 替代浏览器的 confirm + */ +export const ConfirmDialog: React.FC = ({ message, onConfirm, onCancel }) => { + return ( +
+
+
+ +

+ {message} +

+
+ + +
+
+
+
+ ); +};