'use client'; import React from 'react'; import Card from './Card'; interface StatCardProps { icon: React.ElementType; label: string; value: string; subValue?: string; color?: string; bgColor?: string; trend?: { value: number; isPositive: boolean; }; } /** * Statistics card component for displaying metrics with icon, label, value, and optional trend. * Used in dashboards and overview sections. */ export default function StatCard({ icon: Icon, label, value, subValue, color = 'text-primary-blue', bgColor = 'bg-primary-blue/10', trend, }: StatCardProps) { return (
{label}
{value}
{subValue && (
{subValue}
)}
{trend && (
{trend.isPositive ? '↑' : '↓'} {Math.abs(trend.value)}%
)}
); }