"use client"; interface Props { title: string; mean7d: number; annualized: number; accent: "blue" | "indigo" | "green"; } const accentMap = { blue: { border: "border-blue-200", bg: "bg-blue-50", text: "text-blue-600", label: "text-blue-700", divider: "border-blue-100", }, indigo: { border: "border-indigo-200", bg: "bg-indigo-50", text: "text-indigo-600", label: "text-indigo-700", divider: "border-indigo-100", }, green: { border: "border-green-200", bg: "bg-green-50", text: "text-green-600", label: "text-green-700", divider: "border-green-100", }, }; export default function StatsCard({ title, mean7d, annualized, accent }: Props) { const c = accentMap[accent]; const isPositive = annualized >= 0; return (

{title}

预估年化收益率

{annualized >= 0 ? "+" : ""}{annualized.toFixed(2)}%

7天均值费率

{mean7d >= 0 ? "+" : ""}{mean7d.toFixed(4)}% / 8h

); }