import React from 'react'; // A row of pill buttons that pick one of several options without reloading. // `options` are {key, label, href}; the href is where the link goes without // JavaScript. `value` is the chosen key. export default function ChipToggle({options, value, onChange, className = ''}) { return (
{options.map(({key, label, href = '#'}) => ( { event.preventDefault(); onChange(key); }} > {label} ))}
); }