From 042acf275628720b39f20b837683913fd0d484d8 Mon Sep 17 00:00:00 2001
From: JOYCEQL <1449239013@qq.com>
Date: Mon, 20 Apr 2026 23:15:15 +0800
Subject: [PATCH] style: delete modal ui
---
src/components/shared/ThemeModal.tsx | 123 +++++----------------------
1 file changed, 23 insertions(+), 100 deletions(-)
diff --git a/src/components/shared/ThemeModal.tsx b/src/components/shared/ThemeModal.tsx
index ac5ed2a..b97e8c1 100644
--- a/src/components/shared/ThemeModal.tsx
+++ b/src/components/shared/ThemeModal.tsx
@@ -1,6 +1,4 @@
-import { useState } from "react";
-import { motion } from "framer-motion";
import { useTranslations } from "@/i18n/compat/client";
import {
AlertDialog,
@@ -26,109 +24,34 @@ const ThemeModal = ({
onConfirm,
title,
}: ThemedAlertDialogProps) => {
- const [isHovered, setIsHovered] = useState(false);
const t = useTranslations("themeModal.delete");
- const modalContent = {
- delete: {
- title: t("title"),
- description: (
- <>
-
- {t.raw("description").split("{title}")[0]}
- {title}
-
- {t.raw("description").split("{title}")[1]}
- >
- ),
- confirmText: t("confirmText"),
- illustration: (
-
- ),
- },
- };
-
- const content = modalContent["delete"];
-
return (
- e.stopPropagation()}
- className="max-w-md rounded-[32px] border-none dark:bg-neutral-900 bg-white p-0 shadow-xl"
- >
-
-
-
-
-
+
e.stopPropagation()}>
+
+ {t("title")}
+
+
+ {t.raw("description").split("{title}")[0]}
+ {title}
+ {t.raw("description").split("{title}")[1]}
+
+
+
-
-
- {content.illustration}
-
-
-
-
- {content.title}
-
-
- {content.description}
- {/* 渲染成组件 */}
-
-
-
-
-
- {t("cancelText")}
-
- setIsHovered(true)}
- onMouseLeave={() => setIsHovered(false)}
- className="group relative flex-1 overflow-hidden rounded-full bg-primary px-6 py-3 text-base font-semibold text-white hover:bg-primary"
- >
- {content.confirmText}
-
-
-
-
-
+
+ {t("cancelText")}
+ {
+ e.stopPropagation();
+ onConfirm();
+ }}
+ className="bg-red-600 hover:bg-red-700 text-white focus:ring-red-600 border-none"
+ >
+ {t("confirmText")}
+
+
);