섹션 삭제 후 텍스트 블록 추가 버그 수정 및 버튼/구분선 스타일-속성 패널 동기화
This commit is contained in:
+18
-3
@@ -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"}>
|
||||
|
||||
Reference in New Issue
Block a user