const Select = ({ name, id, label, touched, error, ...props }: any) => {
  return (
    <>
      {label && <label htmlFor={props.id || props.name}>{label}</label>}
      <select name={name} id={id || name} {...props} />
      {touched && error && <div className='error'>{error}</div>}
    </>
  )
}

export default Select
