import React from 'react'; import { motion, useReducedMotion } from 'framer-motion'; import { ArrowUpRight, ArrowDownRight, LucideIcon } from 'lucide-react'; import { Card } from '@/ui/Card'; import { Box } from '@/ui/Box'; import { Stack } from '@/ui/Stack'; import { Text } from '@/ui/Text'; interface MetricCardProps { title: string; value: number | string; change?: number; icon: LucideIcon; suffix?: string; prefix?: string; delay?: number; } export function MetricCard({ title, value, change, icon: Icon, suffix = '', prefix = '', delay = 0, }: MetricCardProps) { const shouldReduceMotion = useReducedMotion(); const isPositive = change && change > 0; const isNegative = change && change < 0; return ( {change !== undefined && ( {isPositive ? : isNegative ? : null} {Math.abs(change)}% )} {prefix}{typeof value === 'number' ? value.toLocaleString() : value}{suffix} {title} ); }