fix: fix dark mode switching bug

This commit is contained in:
Guoqi Sun 2025-02-04 14:49:56 +08:00
parent 3c3a8cf887
commit 1f99fc17f5
2 changed files with 2 additions and 0 deletions

View file

@ -31,6 +31,7 @@ export function ThemeToggle() {
onClick={handleToggleClick}
aria-label="Toggle theme"
title="Toggle theme"
className="cursor-pointer"
>
<Sun className="dark:hidden" />
<Moon className="hidden dark:block" />

View file

@ -1,4 +1,5 @@
@import "tailwindcss";
@custom-variant dark (&:where(.dark, .dark *));
/* Theme toggle effect */
/* https://theme-toggle.rdsx.dev/ */