import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { ArrowDownIcon, ArrowUpIcon, MinusIcon } from "lucide-react"; interface MetricsCardProps { title: string; value: string | number; description?: string; trend?: number; // percent change icon?: React.ReactNode; } export function MetricsCard({ title, value, description, trend, icon }: MetricsCardProps) { return ( {title} {icon &&
{icon}
}
{value}
{(trend !== undefined || description) && (

{trend !== undefined && ( 0 ? 'text-success' : trend < 0 ? 'text-destructive' : ''}`}> {trend > 0 ? : trend < 0 ? : } {Math.abs(trend)}% )} {description}

)}
); }