import type { LucideIcon } from "lucide-react"; import { Card, CardContent } from "../ui/card"; import { cn } from "../../lib/utils"; interface StatCardProps { title: string; value: string | number; subtitle?: string; icon: LucideIcon; trend?: { value: number; isPositive: boolean; }; className?: string; } export default function StatCard({ title, value, subtitle, icon: Icon, trend, className, }: StatCardProps) { return (
{title}
{value}
{trend && (
{trend.isPositive ? "+" : ""} {trend.value}%
)}
{subtitle && (
{subtitle}
)}
); }