From ca28857d4063a2332569cc72abd2b1a49cb2137f Mon Sep 17 00:00:00 2001 From: shadcn Date: Mon, 20 Oct 2025 16:05:14 +0400 Subject: [PATCH] fix: themes --- apps/v4/components/theme-customizer.tsx | 2 +- apps/v4/components/theme-selector.tsx | 86 +++++-------------------- 2 files changed, 16 insertions(+), 72 deletions(-) diff --git a/apps/v4/components/theme-customizer.tsx b/apps/v4/components/theme-customizer.tsx index d3e55be2f1..ed3cdaee25 100644 --- a/apps/v4/components/theme-customizer.tsx +++ b/apps/v4/components/theme-customizer.tsx @@ -147,7 +147,7 @@ export function CopyCodeButton({ Copy Code - + {activeThemeName === "neutral" ? "Default" : activeThemeName} diff --git a/apps/v4/components/theme-selector.tsx b/apps/v4/components/theme-selector.tsx index 99127490aa..9bfdb083eb 100644 --- a/apps/v4/components/theme-selector.tsx +++ b/apps/v4/components/theme-selector.tsx @@ -6,59 +6,17 @@ import { Label } from "@/registry/new-york-v4/ui/label" import { Select, SelectContent, - SelectGroup, SelectItem, - SelectLabel, - SelectSeparator, SelectTrigger, SelectValue, } from "@/registry/new-york-v4/ui/select" +import { baseColors } from "@/registry/registry-base-colors" -const DEFAULT_THEMES = [ - { - name: "Default", - value: "default", - }, - { - name: "Scaled", - value: "scaled", - }, - { - name: "Mono", - value: "mono", - }, -] +import { CopyCodeButton } from "./theme-customizer" -const COLOR_THEMES = [ - { - name: "Blue", - value: "blue", - }, - { - name: "Green", - value: "green", - }, - { - name: "Amber", - value: "amber", - }, - { - name: "Rose", - value: "rose", - }, - { - name: "Purple", - value: "purple", - }, - { - name: "Orange", - value: "orange", - }, - { - name: "Teal", - value: "teal", - }, -] +const COLOR_THEMES = baseColors.filter( + (theme) => !["slate", "stone", "gray", "zinc"].includes(theme.name) +) export function ThemeSelector({ className }: React.ComponentProps<"div">) { const { activeTheme, setActiveTheme } = useThemeConfig() @@ -78,32 +36,18 @@ export function ThemeSelector({ className }: React.ComponentProps<"div">) { - - {DEFAULT_THEMES.map((theme) => ( - - {theme.name} - - ))} - - - - Colors - {COLOR_THEMES.map((theme) => ( - - {theme.name} - - ))} - + {COLOR_THEMES.map((theme) => ( + + {theme.label === "Neutral" ? "Default" : theme.label} + + ))} + ) }