export const Select = (props) => {
  const {options, id, onChange, value, textLabel} = props
  return (
    <div className={classNames(`select`)}>
      <label htmlFor={id} className="select__label">
        {textLabel}
      </label>
      <div className="select__inner">
        <select
          name={id}
          id={id}
          value={value}
          className="select__input"
          onChange={(event) => onChange(event.target.value)}
        >
          {options.map((option) => (
            <option key={option.id} value={option.id}>
              {option.title}
            </option>
          ))}
        </select>
      </div>
    </div>
  )
}
