섹션 삭제 후 텍스트 블록 추가 버그 수정 및 버튼/구분선 스타일-속성 패널 동기화
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
+18 -3
View File
@@ -876,9 +876,11 @@ function SortableEditorBlock({
textProps.size === "sm" ? "sm" : textProps.size === "lg" ? "lg" : "base";
const fontSizeScale = textProps.fontSizeScale ?? fallbackScale;
if (fontSizeMode === "scale") {
sizeClass = `pb-text-${fontSizeScale}`;
} else if (fontSizeMode === "custom" && textProps.fontSizeCustom) {
// 스케일/커스텀 모드와 무관하게 pb-text-* 스케일 클래스는 항상 유지한다.
sizeClass = `pb-text-${fontSizeScale}`;
// custom 모드에서는 inline 스타일로 실제 폰트 크기를 덮어쓴다.
if (fontSizeMode === "custom" && textProps.fontSizeCustom) {
textStyleOverrides.fontSize = textProps.fontSizeCustom;
}
@@ -980,6 +982,13 @@ function SortableEditorBlock({
event.stopPropagation();
selectBlock(block.id);
}}
onDoubleClick={(event) => {
if (block.type === "text") {
// 더블클릭 시 텍스트 블록 인라인 편집 모드로 진입한다.
event.stopPropagation();
startEditing(block.id, (block.props as TextBlockProps).text);
}
}}
>
<div className="flex items-start gap-2">
<button
@@ -1380,6 +1389,12 @@ function SortableEditorBlock({
if (buttonProps.textColorCustom && buttonProps.textColorCustom.trim() !== "") {
buttonStyle.color = buttonProps.textColorCustom;
}
if (typeof buttonProps.paddingX === "number" && buttonProps.paddingX >= 0) {
buttonStyle.paddingInline = `${buttonProps.paddingX}px`;
}
if (typeof buttonProps.paddingY === "number" && buttonProps.paddingY >= 0) {
buttonStyle.paddingBlock = `${buttonProps.paddingY}px`;
}
return (
<div className={fullWidth ? "w-full" : "inline-block"}>