import { type LucideIcon } from 'lucide-react' import { Skeleton } from '@/components/ui/skeleton' interface StatCardProps { title: string value: string | number description: string icon: LucideIcon loading?: boolean error?: boolean action?: React.ReactNode } export function StatCard(props: StatCardProps) { const Icon = props.icon return (
{props.title}
{props.action && (
{props.action}
)}
{props.loading ? (
) : props.error ? ( <>
--

{props.description}

) : ( <>
{props.value}

{props.description}

)}
) }