위젯 헤더 설정 디자이너 화면에서도 적용되도록

This commit is contained in:
dohyeons 2025-11-17 12:22:13 +09:00
parent 800da3bf21
commit 227ab1904c
1 changed files with 9 additions and 7 deletions

View File

@ -812,11 +812,12 @@ export function CanvasElement({
}}
onMouseDown={handleMouseDown}
>
{/* 헤더 */}
<div className="flex cursor-move items-center justify-between px-2 py-1">
<div className="flex items-center gap-2">
{/* 차트 타입 전환 드롭다운 (차트일 경우만) */}
{element.type === "chart" && (
{/* 헤더 - showHeader가 false이면 숨김 */}
{element.showHeader !== false && (
<div className="flex cursor-move items-center justify-between px-2 py-1">
<div className="flex items-center gap-2">
{/* 차트 타입 전환 드롭다운 (차트일 경우만) */}
{element.type === "chart" && (
<Select
value={element.subtype}
onValueChange={(newSubtype: string) => {
@ -871,10 +872,11 @@ export function CanvasElement({
<X className="h-3 w-3" />
</Button>
</div>
</div>
</div>
)}
{/* 내용 */}
<div className="relative h-[calc(100%-32px)] px-2 pb-2">
<div className={`relative px-2 pb-2 ${element.showHeader !== false ? "h-[calc(100%-32px)]" : "h-full"}`}>
{element.type === "chart" ? (
// 차트 렌더링
<div className="bg-background h-full w-full">