260128_03_ENH: 샘플데이터 랜덤 적용, lg 보급률 하단 카드 + 게이지 테이블 적용

This commit is contained in:
2026-01-28 17:01:40 +09:00
parent 4c00cfa946
commit d7cb9259cd
12 changed files with 395 additions and 134 deletions

View File

@@ -0,0 +1,58 @@
"use client";
import React from "react";
import { cn } from "@/lib/utils";
import {GaugeColumn, GaugeTable} from "@/components/lge-dashboard";
import Card from "@/components/lge-dashboard/card/Card";
export type GaugeCardTableProps<T> = {
/** 카드 제목 */
title: string;
/** GaugeTable columns */
columns: GaugeColumn<T>[];
/** GaugeTable rows */
rows: T[];
/** GaugeTable 옵션들 (필요한 것만 노출) */
cellHeight?: number;
fillColor?: string;
trackColor?: string;
className?: string;
cardClassName?: string;
tableClassName?: string;
};
const GaugeCardTable = <T extends Record<string, unknown>>(
props: GaugeCardTableProps<T>
) => {
const {
title,
columns,
rows,
cellHeight = 26,
fillColor,
trackColor,
className,
cardClassName,
tableClassName,
} = props;
return (
<div className={cn("w-full", className)}>
<Card label={title} className={cardClassName}>
<div className={cn("w-full", tableClassName)}>
<GaugeTable
columns={columns}
rows={rows}
cellHeight={cellHeight}
fillColor={fillColor}
trackColor={trackColor}
/>
</div>
</Card>
</div>
);
};
export default GaugeCardTable;