import { LucideIcon } from "lucide-react"; import { cn } from "@/lib/utils"; import { TrendingUp, TrendingDown, Minus } from "lucide-react"; interface StatsCardProps { title: string; value: string | number; change?: string; trend?: "up" | "down" | "neutral"; icon: LucideIcon; color?: "blue" | "green" | "purple" | "orange" | "red"; className?: string; } export function StatsCard({ title, value, change, trend, icon: Icon, color = "blue", className, }: StatsCardProps) { const colorStyles = { blue: { gradient: "from-blue-500/10 to-blue-600/5", iconBg: "bg-gradient-to-br from-blue-500 to-blue-600", iconShadow: "shadow-blue-500/25", text: "text-blue-600", trendUp: "text-emerald-600", trendDown: "text-red-600", }, green: { gradient: "from-emerald-500/10 to-emerald-600/5", iconBg: "bg-gradient-to-br from-emerald-500 to-emerald-600", iconShadow: "shadow-emerald-500/25", text: "text-emerald-600", trendUp: "text-emerald-600", trendDown: "text-red-600", }, purple: { gradient: "from-violet-500/10 to-violet-600/5", iconBg: "bg-gradient-to-br from-violet-500 to-violet-600", iconShadow: "shadow-violet-500/25", text: "text-violet-600", trendUp: "text-emerald-600", trendDown: "text-red-600", }, orange: { gradient: "from-amber-500/10 to-amber-600/5", iconBg: "bg-gradient-to-br from-amber-500 to-orange-600", iconShadow: "shadow-amber-500/25", text: "text-amber-600", trendUp: "text-emerald-600", trendDown: "text-red-600", }, red: { gradient: "from-rose-500/10 to-rose-600/5", iconBg: "bg-gradient-to-br from-rose-500 to-rose-600", iconShadow: "shadow-rose-500/25", text: "text-rose-600", trendUp: "text-emerald-600", trendDown: "text-red-600", }, }; const styles = colorStyles[color]; const TrendIcon = trend === "up" ? TrendingUp : trend === "down" ? TrendingDown : Minus; return (
{title}