import { LucideIcon } from 'lucide-react'; import { Box } from './Box'; import { Card } from './Card'; import { Icon } from './Icon'; import { Text } from './Text'; export interface HorizontalStatCardProps { label: string; value: string | number; icon: LucideIcon | React.ReactNode; intent?: 'primary' | 'success' | 'warning' | 'critical' | 'telemetry'; subValue?: string; iconBgColor?: string; } export const HorizontalStatCard = ({ label, value, icon, intent = 'primary', subValue, iconBgColor }: HorizontalStatCardProps) => { const isLucideIcon = typeof icon === 'function' || (typeof icon === 'object' && icon !== null && 'render' in icon); return ( {isLucideIcon ? ( ) : ( icon )} {label} {value} {subValue && ( {subValue} )} ); };