import { LucideIcon } from 'lucide-react'; import React from 'react'; import { Box } from './Box'; import { Icon } from './Icon'; import { Text } from './Text'; import { Stack } from './Stack'; export interface StatGridItemProps { label: string; value: string | number; icon?: React.ReactNode | LucideIcon; intent?: 'primary' | 'success' | 'warning' | 'critical' | 'high' | 'med' | 'low'; color?: string; // Alias for intent } export const StatGridItem = ({ label, value, icon, intent = 'high', color }: StatGridItemProps) => { const isLucideIcon = typeof icon === 'function' || (typeof icon === 'object' && icon !== null && 'render' in icon); return ( {icon && ( {isLucideIcon ? ( ) : ( icon )} )} {value} {label} ); };