import { InputProps } from './forms'

interface TextInputProps extends InputProps {
  label: string
}

const TextInput = ({ label, ...inputProps }: TextInputProps) => (
  <>
    <label htmlFor={inputProps.name}>{label}</label>
    <input {...inputProps} />
  </>
)

export default TextInput