파일 업로드 컴포넌트 높이 조절 수정
This commit is contained in:
parent
5b8bad17ef
commit
01e03dedbf
|
|
@ -222,9 +222,11 @@ export const RealtimePreviewDynamic: React.FC<RealtimePreviewProps> = ({
|
||||||
return `${actualHeight}px`;
|
return `${actualHeight}px`;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 1순위: style.height가 있으면 우선 사용
|
// 1순위: style.height가 있으면 우선 사용 (문자열 그대로 또는 숫자+px)
|
||||||
if (componentStyle?.height) {
|
if (componentStyle?.height) {
|
||||||
return componentStyle.height;
|
return typeof componentStyle.height === 'number'
|
||||||
|
? `${componentStyle.height}px`
|
||||||
|
: componentStyle.height;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2순위: size.height (픽셀)
|
// 2순위: size.height (픽셀)
|
||||||
|
|
@ -232,7 +234,14 @@ export const RealtimePreviewDynamic: React.FC<RealtimePreviewProps> = ({
|
||||||
return `${Math.max(size?.height || 200, 200)}px`;
|
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 = {
|
const baseStyle = {
|
||||||
|
|
|
||||||
|
|
@ -901,6 +901,8 @@ const FileUploadComponent: React.FC<FileUploadComponentProps> = ({
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
...componentStyle,
|
...componentStyle,
|
||||||
|
width: "100%", // 🆕 부모 컨테이너 너비에 맞춤
|
||||||
|
height: "100%", // 🆕 부모 컨테이너 높이에 맞춤
|
||||||
border: "none !important",
|
border: "none !important",
|
||||||
boxShadow: "none !important",
|
boxShadow: "none !important",
|
||||||
outline: "none !important",
|
outline: "none !important",
|
||||||
|
|
@ -938,7 +940,6 @@ const FileUploadComponent: React.FC<FileUploadComponentProps> = ({
|
||||||
|
|
||||||
<div
|
<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"
|
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 && (
|
{/* {!isDesignMode && (
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue