Skip to content

Commit

Permalink
www: Use ghost variant for theme toggle
Browse files Browse the repository at this point in the history
Change-Id: Ibe3e4288f1cb543f1ac406c0051dae42adcc1bfb
  • Loading branch information
neroices committed Dec 31, 2024
1 parent b9f7fa0 commit 6977119
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/components/theme-toggle.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
"use client"
"use client";

import * as React from "react"
import { LuMoon, LuSun } from 'react-icons/lu'
import { useTheme } from "next-themes"
import * as React from "react";
import { LuMoon, LuSun } from "react-icons/lu";
import { useTheme } from "next-themes";

import { Button } from "@/components/ui/button"
import { Button } from "@/components/ui/button";
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu"
} from "@/components/ui/dropdown-menu";

export function ThemeToggle() {
const { setTheme } = useTheme()
const { setTheme } = useTheme();

return (
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button variant="outline" size="icon">
<Button variant="ghost" size="icon">
<LuSun className="h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" />
<LuMoon className="absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" />
<span className="sr-only">Toggle theme</span>
Expand All @@ -36,6 +36,5 @@ export function ThemeToggle() {
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
)
);
}

0 comments on commit 6977119

Please sign in to comment.