import React from "react"; import clsx from "clsx"; // TODO: It might be "clever" to add option.icon to the existing component export const ButtonIconSelect = ({ options, value, onChange, group, }: { options: { value: T; text: string; icon: JSX.Element }[]; value: T | null; onChange: (value: T) => void; group: string; }) => ( {options.map((option) => ( onChange(option.value)} checked={value === option.value} /> {option.icon} ))} );