import { Icon } from './Icon.jsx'

export const ComboBox = ({ options, value, setValue }) => {
    return (
        <div class="input-combo">
            <select onInput={e => setValue(e.target.value)}>
                {options.map(option => (
                    <option value={option.value} selected={option.value === value}>
                        {option.label}
                    </option>
                ))}
            </select>
            <div class="icon">
                <Icon name="expand_more" />
            </div>
        </div>
    )
}
