Skip to content

Commit d85fa23

Browse files
authored
Fixed the light mode icon non-visibility
1 parent 78c916e commit d85fa23

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

components/ModeToggle.jsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ export function ModeToggle() {
1414
<Button variant="ghost" size="icon" className="relative overflow-hidden group">
1515
<div className="absolute inset-0 bg-gradient-to-br from-primary/20 to-secondary/20 opacity-0 group-hover:opacity-100 transition-opacity duration-300 rounded-md"></div>
1616
{theme === "dark" ? (
17-
<Moon className="h-[1.2rem] w-[1.2rem] text-primary animate-pulse" />
18-
) : theme === "light" ? (
19-
<Sun className="h-[1.2rem] w-[1.2rem] text-secondary animate-pulse" />
20-
) : (
21-
<Sparkles className="h-[1.2rem] w-[1.2rem] text-accent animate-pulse" />
22-
)}
17+
<Moon className="h-[1.2rem] w-[1.2rem] text-primary animate-pulse" />
18+
) : theme === "light" ? (
19+
<Sun className="h-[1.2rem] w-[1.2rem] text-yellow-400 animate-pulse" />
20+
) : (
21+
<Sparkles className="h-[1.2rem] w-[1.2rem] text-accent animate-pulse" />
22+
)}
23+
2324
<span className="sr-only">Toggle theme</span>
2425
</Button>
2526
</DropdownMenuTrigger>
@@ -28,7 +29,8 @@ export function ModeToggle() {
2829
onClick={() => setTheme("light")}
2930
className="cursor-pointer focus:bg-primary/10 hover:bg-primary/10 transition-colors duration-200 flex items-center gap-2"
3031
>
31-
<Sun className="h-4 w-4 text-secondary" />
32+
<Sun className="h-4 w-4 text-yellow-400" />
33+
3234
Light
3335
</DropdownMenuItem>
3436
<DropdownMenuItem

0 commit comments

Comments
 (0)