통계 카드 수정
This commit is contained in:
parent
21f4f30859
commit
7edd0cc1b0
|
|
@ -272,26 +272,22 @@ export default function CustomMetricTestWidget({ element }: CustomMetricTestWidg
|
|||
const decimals = config?.decimals ?? 0;
|
||||
const formattedValue = value.toFixed(decimals);
|
||||
|
||||
// 통계 카드 렌더링
|
||||
// 통계 카드 렌더링 (전체 크기 꽉 차게)
|
||||
return (
|
||||
<div className="flex h-full w-full items-center justify-center bg-background p-4">
|
||||
<div className="flex flex-col items-center justify-center rounded-lg border bg-card p-6 text-center shadow-sm">
|
||||
{/* 제목 */}
|
||||
<div className="text-muted-foreground mb-2 text-sm font-medium">{config?.title || "통계"}</div>
|
||||
<div className="flex h-full w-full flex-col items-center justify-center rounded-lg border bg-card p-6 text-center shadow-sm">
|
||||
{/* 제목 */}
|
||||
<div className="text-muted-foreground mb-2 text-sm font-medium">{config?.title || "통계"}</div>
|
||||
|
||||
{/* 값 */}
|
||||
<div className="flex items-baseline gap-1">
|
||||
<span className="text-primary text-4xl font-bold">{formattedValue}</span>
|
||||
{config?.unit && <span className="text-muted-foreground text-lg">{config.unit}</span>}
|
||||
</div>
|
||||
|
||||
{/* 필터 표시 (디버깅용, 작게) */}
|
||||
{config?.filters && config.filters.length > 0 && (
|
||||
<div className="text-muted-foreground mt-2 text-xs">
|
||||
필터: {config.filters.length}개 적용됨
|
||||
</div>
|
||||
)}
|
||||
{/* 값 */}
|
||||
<div className="flex items-baseline gap-1">
|
||||
<span className="text-primary text-4xl font-bold">{formattedValue}</span>
|
||||
{config?.unit && <span className="text-muted-foreground text-lg">{config.unit}</span>}
|
||||
</div>
|
||||
|
||||
{/* 필터 표시 (디버깅용, 작게) */}
|
||||
{config?.filters && config.filters.length > 0 && (
|
||||
<div className="text-muted-foreground mt-2 text-xs">필터: {config.filters.length}개 적용됨</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue