import React from "react";
import "./customSelect.scss";

export const customSelect = ({ label, input, children, id, meta }) => {
	return (
		<div className="form-block__select" id = {'select_'+id}>
			<label className="select-box" htmlFor={id}>{label}</label>
			<select {...input} className = "select-box__input" >{children}</select>
            {meta.error && meta.touched && (
				<span className="error">{meta.error}</span>
			)}
		</div>
	)
}