mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-06-27 22:54:18 +00:00
* feat: update dark colors * feat(v4): update dark mode colors * fix * fix * fix: slate and stone mismatches * feat(v4): update skeleton and switch colors * feat(v4): add dashboard example * fix(v4): update dashboard components * fix: themes * feat: update sonner * feat(v4): update dashboard buttons * fix: test new colors * fix: build commands * feat(v4): more color updates * feat(v4): update theme selector * fix(v4): minor component fixes
31 lines
761 B
TypeScript
31 lines
761 B
TypeScript
"use client"
|
|
|
|
import { THEMES } from "@/lib/themes"
|
|
import { useThemeConfig } from "@/components/active-theme"
|
|
import {
|
|
Select,
|
|
SelectContent,
|
|
SelectItem,
|
|
SelectTrigger,
|
|
SelectValue,
|
|
} from "@/registry/new-york-v4/ui/select"
|
|
|
|
export function ThemeSelector() {
|
|
const { activeTheme, setActiveTheme } = useThemeConfig()
|
|
|
|
return (
|
|
<Select value={activeTheme} onValueChange={setActiveTheme}>
|
|
<SelectTrigger size="sm" className="w-32">
|
|
<SelectValue placeholder="Select a theme" />
|
|
</SelectTrigger>
|
|
<SelectContent align="end">
|
|
{THEMES.map((theme) => (
|
|
<SelectItem key={theme.name} value={theme.value}>
|
|
{theme.name}
|
|
</SelectItem>
|
|
))}
|
|
</SelectContent>
|
|
</Select>
|
|
)
|
|
}
|