import { FunctionComponent } from 'react' interface ButtonGroupProps { activeValue: string onChange: (x) => void unit?: string values: Array } const ButtonGroup: FunctionComponent = ({ activeValue, unit, values, onChange, }) => { return (
{activeValue ? (
v === activeValue) * 100 }%)`, width: `${100 / values.length}%`, }} /> ) : null} {values.map((v, i) => ( ))}
) } export default ButtonGroup