Skip to main content
Glama
mode-toggle.tsx1.39 kB
"use client" import { Button } from "@repo/ui/components/ui/button" import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "@repo/ui/components/ui/dropdown-menu" import { MonitorIcon, MoonIcon, SunIcon } from "lucide-react" import { useTheme } from "next-themes" export function ModeToggle() { const { setTheme } = useTheme() return ( <DropdownMenu> <DropdownMenuTrigger asChild> <Button variant="outline" size="icon" className="size-8 rounded-full"> <SunIcon className="dark:-rotate-90 h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:scale-0" /> <MoonIcon 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> </Button> </DropdownMenuTrigger> <DropdownMenuContent align="end" onCloseAutoFocus={(e) => e.preventDefault()}> <DropdownMenuItem onClick={() => setTheme("light")}> <SunIcon /> Light </DropdownMenuItem> <DropdownMenuItem onClick={() => setTheme("dark")}> <MoonIcon /> Dark </DropdownMenuItem> <DropdownMenuItem onClick={() => setTheme("system")}> <MonitorIcon /> System </DropdownMenuItem> </DropdownMenuContent> </DropdownMenu> ) }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/metacode0602/open-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server