import React from 'react'; import './fields.css'; export type ButtonSetOption = { value: string; label: string; }; type ButtonSetProps = { label?: string; description?: string; options: ButtonSetOption[]; value: string; onChange: (value: string) => void; }; export const ButtonSet: React.FC = ({ label, description, options, value, onChange }) => { return (
{label &&
{label}
}
{options.map((opt, idx) => { const active = opt.value === value; return ( ); })}
{description &&
{description}
}
); };