import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; import { LucideIcon } from "lucide-react"; import { formatNumber } from "@/lib/utils"; interface MetricCardProps { title: string; value: number | string; icon: LucideIcon; description?: string; trend?: { value: number; isPositive: boolean; }; className?: string; } export function MetricCard({ title, value, icon: Icon, description, trend, className }: MetricCardProps) { return ( {title}
{typeof value === 'number' ? formatNumber(value) : value}
{description && (

{description}

)} {trend && ( {trend.isPositive ? '+' : ''}{trend.value}% )}
); }