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