From a484bdffa4c41a40dadbd7cd92e7f65d3aa3d7bd Mon Sep 17 00:00:00 2001 From: Bereket Engida Date: Sat, 29 Nov 2025 21:35:35 -0800 Subject: [PATCH] docs: change theme toggler --- docs/components/theme-toggler.tsx | 141 ++++++++++++++++++++++++++++-- 1 file changed, 136 insertions(+), 5 deletions(-) diff --git a/docs/components/theme-toggler.tsx b/docs/components/theme-toggler.tsx index d502579733..0bc1abd9fe 100644 --- a/docs/components/theme-toggler.tsx +++ b/docs/components/theme-toggler.tsx @@ -1,6 +1,5 @@ "use client"; -import { Moon, Sun } from "lucide-react"; import { useTheme } from "next-themes"; import type { ComponentProps } from "react"; import { Button } from "@/components/ui/button"; @@ -13,7 +12,7 @@ import { import { cn } from "@/lib/utils"; export function ThemeToggle(props: ComponentProps) { - const { setTheme } = useTheme(); + const { setTheme, theme } = useTheme(); return ( @@ -24,12 +23,144 @@ export function ThemeToggle(props: ComponentProps) { aria-label="Toggle Theme" {...props} className={cn( - "flex ring-0 shrink-0 navbar:w-[3.56rem] navbar:h-14 navbar:border-l navbar:text-muted-foreground max-navbar:-mr-1.5 max-navbar:hover:bg-transparent", + "flex shrink-0 navbar:w-[3.56rem] navbar:h-14 navbar:border-l navbar:text-muted-foreground max-navbar:-mr-1.5 max-navbar:hover:bg-transparent", props.className, )} > - - + {theme === "light" && ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + )} + + + +