Self-hosted US Congress monitoring platform with AI policy briefs, bill/member/topic follows, ntfy + RSS + email notifications, alignment scoring, collections, and draft-letter generator. Authored by: Jack Levy
20 lines
535 B
TypeScript
20 lines
535 B
TypeScript
"use client";
|
|
|
|
import { Moon, Sun } from "lucide-react";
|
|
import { useTheme } from "next-themes";
|
|
|
|
export function ThemeToggle() {
|
|
const { theme, setTheme } = useTheme();
|
|
|
|
return (
|
|
<button
|
|
onClick={() => setTheme(theme === "dark" ? "light" : "dark")}
|
|
className="p-1.5 rounded-md hover:bg-accent transition-colors text-muted-foreground hover:text-foreground"
|
|
aria-label="Toggle theme"
|
|
>
|
|
<Sun className="w-4 h-4 hidden dark:block" />
|
|
<Moon className="w-4 h-4 dark:hidden" />
|
|
</button>
|
|
);
|
|
}
|