import React from 'react'; import type { ReactNode } from 'react'; interface ButtonOption { value: string; label: string; icon?: ReactNode; } interface ButtonGroupProps { options: ButtonOption[]; value: string; onChange: (value: string) => void; } const ButtonGroup: React.FC = ({ options, value, onChange }) => { return (
{options.map((option, index) => { const isActive = value === option.value; return ( ); })}
); }; export default ButtonGroup;