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

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 = {

View File

@@ -901,6 +901,8 @@ const FileUploadComponent: React.FC<FileUploadComponentProps> = ({
<div
style={{
...componentStyle,
width: "100%", // 🆕 부모 컨테이너 너비에 맞춤
height: "100%", // 🆕 부모 컨테이너 높이에 맞춤
border: "none !important",
boxShadow: "none !important",
outline: "none !important",
@@ -938,7 +940,6 @@ const FileUploadComponent: React.FC<FileUploadComponentProps> = ({
<div
className="border-border bg-card flex h-full w-full flex-col space-y-3 rounded-lg border p-3 transition-all duration-200 hover:shadow-sm"
style={{ minHeight: "140px" }}
>
{/* 파일 업로드 영역 - 주석처리 */}
{/* {!isDesignMode && (