파일 업로드 컴포넌트 높이 조절 수정
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user