섹션 삭제 후 텍스트 블록 추가 버그 수정 및 버튼/구분선 스타일-속성 패널 동기화
CI / test (push) Successful in 11m2s
CI / pr_and_merge (push) Successful in 1m19s
CI / test (pull_request) Successful in 51m33s
CI / pr_and_merge (pull_request) Has been skipped

This commit is contained in:
2025-11-22 15:18:32 +09:00
parent d423aedcbe
commit 4e4c9cd37a
17 changed files with 2658 additions and 152 deletions
+85 -22
View File
@@ -26,6 +26,50 @@ export function ButtonPropertiesPanel({ buttonProps, selectedBlockId, updateBloc
/>
</label>
</div>
<div className="space-y-1">
<NumericPropertyControl
label="가로 패딩 (px)"
unitLabel="(px)"
value={buttonProps.paddingX ?? 16}
min={0}
max={120}
step={4}
presets={[
{ id: "xs", label: "XS", value: 8 },
{ id: "sm", label: "S", value: 12 },
{ id: "md", label: "M", value: 16 },
{ id: "lg", label: "L", value: 24 },
{ id: "xl", label: "XL", value: 32 },
]}
onChangeValue={(v) => {
updateBlock(selectedBlockId, {
paddingX: v,
} as any);
}}
/>
</div>
<div className="space-y-1">
<NumericPropertyControl
label="세로 패딩 (px)"
unitLabel="(px)"
value={buttonProps.paddingY ?? 10}
min={0}
max={80}
step={2}
presets={[
{ id: "xs", label: "XS", value: 6 },
{ id: "sm", label: "S", value: 8 },
{ id: "md", label: "M", value: 10 },
{ id: "lg", label: "L", value: 14 },
{ id: "xl", label: "XL", value: 20 },
]}
onChangeValue={(v) => {
updateBlock(selectedBlockId, {
paddingY: v,
} as any);
}}
/>
</div>
<div className="space-y-1">
<label className="flex flex-col gap-1 text-xs text-slate-400">
<span> </span>
@@ -58,27 +102,7 @@ export function ButtonPropertiesPanel({ buttonProps, selectedBlockId, updateBloc
</label>
</div>
<div className="space-y-1">
<NumericPropertyControl
label="버튼 크기"
value={(() => {
const s = buttonProps.size ?? "md";
return s === "xs" ? 1 : s === "sm" ? 2 : s === "lg" ? 4 : s === "xl" ? 5 : 3;
})()}
min={1}
max={5}
step={1}
presets={[
{ id: "xs", label: "아주 작게", value: 1 },
{ id: "sm", label: "작게", value: 2 },
{ id: "md", label: "보통", value: 3 },
{ id: "lg", label: "크게", value: 4 },
{ id: "xl", label: "아주 크게", value: 5 },
]}
onChangeValue={(v) => {
const next = v <= 1 ? "xs" : v === 2 ? "sm" : v === 4 ? "lg" : v >= 5 ? "xl" : "md";
updateBlock(selectedBlockId, { size: next } as any);
}}
/>
{/* 버튼 크기 스케일 컨트롤은 paddingX/paddingY 및 폰트 크기(px) 컨트롤로 충분하므로 제거했다. */}
</div>
<div className="space-y-1">
<ColorPickerField
@@ -191,9 +215,48 @@ export function ButtonPropertiesPanel({ buttonProps, selectedBlockId, updateBloc
}}
/>
</div>
<div className="space-y-1">
<label className="flex flex-col gap-1 text-xs text-slate-400">
<span> </span>
<select
className="rounded border border-slate-700 bg-slate-900 px-2 py-1 text-xs outline-none focus:border-sky-500"
aria-label="버튼 너비 모드"
value={buttonProps.widthMode ?? (buttonProps.fullWidth ? "full" : "auto")}
onChange={(e) => {
updateBlock(selectedBlockId, {
widthMode: e.target.value as NonNullable<ButtonBlockProps["widthMode"]>,
} as any);
}}
>
<option value="auto"></option>
<option value="full"> </option>
<option value="fixed"> </option>
</select>
</label>
{(buttonProps.widthMode ?? (buttonProps.fullWidth ? "full" : "auto")) === "fixed" && (
<NumericPropertyControl
label="버튼 고정 너비"
unitLabel="(px)"
value={buttonProps.widthPx ?? 240}
min={80}
max={600}
step={10}
presets={[
{ id: "sm", label: "작게", value: 180 },
{ id: "md", label: "보통", value: 240 },
{ id: "lg", label: "넓게", value: 320 },
]}
onChangeValue={(v) => {
updateBlock(selectedBlockId, {
widthPx: v,
} as any);
}}
/>
)}
</div>
<div className="space-y-1">
<NumericPropertyControl
label="글자 크기"
label="버튼 크기"
unitLabel="(px)"
value={(() => {
const raw = buttonProps.fontSizeCustom ?? "";