'use client' import { cn } from '@/lib/utils' import { LucideIcon } from 'lucide-react' interface Props { title: string; value: string; change?: number; changeLabel?: string; icon: LucideIcon; variant?: 'default'|'yellow'|'green'|'red'; className?: string } const vs: Record = { default:'border-hairline-dark', yellow:'border-brand-yellow/20 bg-brand-yellow/5', green:'border-trading-up/20 bg-trading-up/5', red:'border-trading-down/20 bg-trading-down/5' } const is: Record = { default:'bg-surface-elevated text-muted', yellow:'bg-brand-yellow/10 text-brand-yellow', green:'bg-trading-up/10 text-trading-up', red:'bg-trading-down/10 text-trading-down' } export function StatCard({ title, value, change, changeLabel, icon: Icon, variant='default', className }: Props) { return (
{title}
{value}
{(change !== undefined || changeLabel) && (
{change !== undefined && = 0 ? 'text-trading-up' : 'text-trading-down')}>{change >= 0 ? '+' : ''}{change.toFixed(1)}%} {changeLabel && {changeLabel}}
)}
) }