import type { StatItem } from '../app-state';

export function StatGrid(props: { items: StatItem[] }) {
  return (
    <section className="statGrid" aria-label="统计">
      {props.items.map((item) => (
        <div className="statCard" data-tone={item.tone} key={item.label}>
          <span>{item.label}</span>
          <strong>{item.value}</strong>
        </div>
      ))}
    </section>
  );
}
