import React from 'react';
import ReactSelect from "react-select";

export function Select({options, placeholder, value, onChange, name}: any) {
    return (
        <>
            <label htmlFor={name}>{placeholder}</label>
            <ReactSelect options={options} placeholder={placeholder}
                         value={options.find((option: any) => option.value === value)}
                    onChange={onChange} name={name}/>
        </>
    );
}
