TheBird

Chips.jsx

401 B · jsx · 13 lines

1export function Chips({ label, cards, current }) {2  if (!cards.length) return null;3  return (4    <nav className="chips" aria-label={label}>5      {cards.map((card) => (6        <a key={card.href} href={card.href} aria-current={card.href === current ? "page" : undefined}>7          <span>{card.name}</span>8          <span className="n">{card.count}</span>9        </a>10      ))}11    </nav>12  );13}