import React from 'react'; import { LucideIcon } from 'lucide-react'; import { Box } from './primitives/Box'; import { Text } from './Text'; import { Icon } from './Icon'; interface MetricCardProps { label: string; value: string | number; icon?: LucideIcon; color?: string; trend?: { value: number; isPositive: boolean; }; border?: boolean; bg?: string; } /** * A semantic component for displaying metrics. * Instrument-grade typography and dense-but-readable hierarchy. */ export function MetricCard({ label, value, icon, color = 'text-primary-accent', trend, border = true, bg = 'panel-gray/40', }: MetricCardProps) { return ( {icon && } {label} {trend && ( {trend.isPositive ? '▲' : '▼'} {trend.value}% )} {typeof value === 'number' ? value.toLocaleString() : value} ); }