export type Tile = { k: string; v: number | string; unit?: string; accent?: boolean };

export function StatTiles({ items }: { items: Tile[] }) {
  return (
    <section className="tiles">
      {items.map((t) => (
        <div key={t.k} className={`tile${t.accent ? " accent" : ""}`}>
          <div className="k">{t.k}</div>
          <div className="v">
            {t.v}
            {t.unit ? <small>{t.unit}</small> : null}
          </div>
        </div>
      ))}
    </section>
  );
}
