"use client"; import { ReactNode } from "react"; import { ArrowTrendingUpIcon as TrendingUpIcon, ArrowTrendingDownIcon as TrendingDownIcon } from "@heroicons/react/24/outline"; interface StatsCardProps { title: string; value: string | number; icon: ReactNode; trend?: { value: string | number; label: string; type: "up" | "down" | "neutral"; }; description?: string; } export default function StatsCard({ title, value, icon, trend, description }: StatsCardProps) { return (

{title}

{value}

{trend && (
{trend.type === 'up' && } {trend.type === 'down' && } {trend.value}
{trend.label}
)} {description && !trend && (

{description}

)}
{icon}
); }