33 lines
703 B
TypeScript
33 lines
703 B
TypeScript
import { StatGrid } from '@/ui/StatGrid';
|
|
|
|
interface KpiItem {
|
|
label: string;
|
|
value: string | number;
|
|
intent?: 'primary' | 'success' | 'warning' | 'critical' | 'high' | 'med' | 'low';
|
|
}
|
|
|
|
interface DashboardKpiRowProps {
|
|
items: KpiItem[];
|
|
}
|
|
|
|
/**
|
|
* DashboardKpiRow
|
|
*
|
|
* A horizontal row of key performance indicators with telemetry styling.
|
|
*/
|
|
export function DashboardKpiRow({ items }: DashboardKpiRowProps) {
|
|
return (
|
|
<StatGrid
|
|
variant="card"
|
|
cardVariant="dark"
|
|
font="mono"
|
|
columns={{ base: 2, md: 3, lg: 6 }}
|
|
stats={items.map(item => ({
|
|
label: item.label,
|
|
value: item.value,
|
|
intent: item.intent as any
|
|
}))}
|
|
/>
|
|
);
|
|
}
|