diff --git a/src/components/Header.astro b/src/components/Header.astro
index 8826b14..d0a4599 100644
--- a/src/components/Header.astro
+++ b/src/components/Header.astro
@@ -153,7 +153,7 @@ const navSelectorClassName = "mr-4";
-
+
@@ -320,6 +320,7 @@ const navSelectorClassName = "mr-4";
width={14}
height={14}
className="group"
+ transitionDuration={700}
/>
diff --git a/src/components/ThemeToggle.astro b/src/components/ThemeToggle.astro
index 9bdbed7..cf0e5b0 100644
--- a/src/components/ThemeToggle.astro
+++ b/src/components/ThemeToggle.astro
@@ -6,6 +6,8 @@ interface Props {
className?: string;
// 更新主题过渡动画模式配置
transitionMode?: "expand" | "shrink" | "auto" | "reverse-auto";
+ // 新增自定义主题切换动画时间
+ transitionDuration?: number;
}
const {
@@ -14,6 +16,7 @@ const {
fill = "currentColor",
className = "",
transitionMode = "auto", // 默认为自动模式
+ transitionDuration = 700, // 默认动画时间(毫秒)
} = Astro.props;
---
@@ -25,6 +28,7 @@ const {
role="button"
tabindex="0"
data-transition-mode={transitionMode}
+ data-transition-duration={transitionDuration}
>