파일 업로드 컴포넌트 높이 조절 수정

This commit is contained in:
dohyeons
2025-11-04 16:26:53 +09:00
parent 5b8bad17ef
commit 01e03dedbf
2 changed files with 14 additions and 4 deletions

View File

@@ -222,9 +222,11 @@ export const RealtimePreviewDynamic: React.FC<RealtimePreviewProps> = ({
return `${actualHeight}px`;
}
// 1순위: style.height가 있으면 우선 사용
// 1순위: style.height가 있으면 우선 사용 (문자열 그대로 또는 숫자+px)
if (componentStyle?.height) {
return componentStyle.height;
return typeof componentStyle.height === 'number'
? `${componentStyle.height}px`
: componentStyle.height;
}
// 2순위: size.height (픽셀)
@@ -232,7 +234,14 @@ export const RealtimePreviewDynamic: React.FC<RealtimePreviewProps> = ({
return `${Math.max(size?.height || 200, 200)}px`;
}
return `${size?.height || 40}px`;
// 3순위: size.height가 있으면 사용
if (size?.height) {
return typeof size.height === 'number'
? `${size.height}px`
: size.height;
}
return "40px";
};
const baseStyle = {