From fef2f4a132e019d4facf703f68b1bf95582b875e Mon Sep 17 00:00:00 2001 From: kjs Date: Tue, 11 Nov 2025 18:27:27 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=ED=99=94=EB=A9=B4=20=ED=8E=B8=EC=A7=91?= =?UTF-8?q?=EA=B8=B0=EC=97=90=EC=84=9C=20=EB=B2=84=ED=8A=BC=20=EC=8A=A4?= =?UTF-8?q?=ED=83=80=EC=9D=BC=20=EC=8B=A4=EC=8B=9C=EA=B0=84=20=EB=B0=98?= =?UTF-8?q?=EC=98=81=20=EB=AC=B8=EC=A0=9C=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **문제:** - 화면 편집기에서 버튼의 스타일(색상, 폰트 등)을 변경해도 실시간으로 반영되지 않음 - 저장 후 실제 화면에서는 정상적으로 보임 **원인:** - ButtonPrimaryComponent에서 isInteractive 모드일 때만 component.style을 적용 - 디자인 모드(isDesignMode)에서는 사용자 정의 스타일이 무시됨 **해결:** - buttonElementStyle에 component.style을 항상 적용하도록 수정 - width/height는 레이아웃 충돌 방지를 위해 제외 유지 - 디자인 모드와 인터랙티브 모드 모두에서 스타일 실시간 반영 **영향:** - 화면 편집기에서 버튼 스타일 변경 시 즉시 미리보기 가능 - 저장하지 않아도 시각적 피드백 제공 --- .../components/button-primary/ButtonPrimaryComponent.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/lib/registry/components/button-primary/ButtonPrimaryComponent.tsx b/frontend/lib/registry/components/button-primary/ButtonPrimaryComponent.tsx index c66d11c4..183581ca 100644 --- a/frontend/lib/registry/components/button-primary/ButtonPrimaryComponent.tsx +++ b/frontend/lib/registry/components/button-primary/ButtonPrimaryComponent.tsx @@ -552,8 +552,8 @@ export const ButtonPrimaryComponent: React.FC = ({ margin: "0", lineHeight: "1.25", boxShadow: componentConfig.disabled ? "none" : "0 1px 2px 0 rgba(0, 0, 0, 0.05)", - // isInteractive 모드에서는 사용자 스타일 우선 적용 (width/height 제외) - ...(isInteractive && component.style ? Object.fromEntries( + // 디자인 모드와 인터랙티브 모드 모두에서 사용자 스타일 적용 (width/height 제외) + ...(component.style ? Object.fromEntries( Object.entries(component.style).filter(([key]) => key !== 'width' && key !== 'height') ) : {}), };