From d1149454a8410d3435c8f2ea7722f381bb858111 Mon Sep 17 00:00:00 2001 From: shadcn Date: Sun, 17 May 2026 12:31:37 +0400 Subject: [PATCH] fix(create): preserve settings when changing style (#10680) --- .../(app)/create/components/style-picker.tsx | 21 ++----------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/apps/v4/app/(app)/create/components/style-picker.tsx b/apps/v4/app/(app)/create/components/style-picker.tsx index 81248b176..5d2dc2f97 100644 --- a/apps/v4/app/(app)/create/components/style-picker.tsx +++ b/apps/v4/app/(app)/create/components/style-picker.tsx @@ -2,7 +2,7 @@ import * as React from "react" -import { PRESETS, type Style, type StyleName } from "@/registry/config" +import { type Style, type StyleName } from "@/registry/config" import { LockButton } from "@/app/(app)/create/components/lock-button" import { Picker, @@ -53,24 +53,7 @@ export function StylePicker({ { - const styleName = value as StyleName - const preset = PRESETS.find( - (p) => p.base === params.base && p.style === styleName - ) - setParams({ - style: styleName, - ...(preset && { - baseColor: preset.baseColor, - theme: preset.theme, - chartColor: preset.chartColor, - iconLibrary: preset.iconLibrary, - font: preset.font, - fontHeading: preset.fontHeading, - menuAccent: preset.menuAccent, - menuColor: preset.menuColor, - radius: preset.radius, - }), - }) + setParams({ style: value as StyleName }) }} >