import { TrendingUp, TrendingDown } from 'lucide-react'; import { StatValue, StatLabel } from '../ui/Typography'; interface StatsCardProps { title: string; value: string | number; change?: number; icon: any; color?: string; } export const StatsCard = ({ title, value, change, icon: Icon, color = 'blue' }: StatsCardProps) => { const colorClasses = { blue: 'bg-blue-500', green: 'bg-green-500', yellow: 'bg-yellow-500', red: 'bg-red-500', purple: 'bg-purple-500', }; const isPositive = change && change > 0; const isNegative = change && change < 0; return (
{title}
{typeof value === 'number' ? value.toLocaleString() : value} {change !== undefined && (
{isPositive && } {isNegative && } {isPositive ? 'افزایش' : 'کاهش'} {Math.abs(change)}%
)}
); };