import React from 'react'; type StatTone = 'amber' | 'violet' | 'green' | 'pink'; const TONE: Record = { amber: { bg: 'var(--stat-amber-bg)', fg: 'var(--stat-amber-fg)' }, violet: { bg: 'var(--stat-violet-bg)', fg: 'var(--stat-violet-fg)' }, green: { bg: 'var(--stat-green-bg)', fg: 'var(--stat-green-fg)' }, pink: { bg: 'var(--stat-pink-bg)', fg: 'var(--stat-pink-fg)' }, }; interface Props { tone: StatTone; label: string; value: React.ReactNode; icon?: React.ReactNode; } export default function StatCard({ tone, label, value, icon }: Props) { const c = TONE[tone]; return (
{icon && (
{icon}
)}
{value}
{label}
); }