import { Input } from '@citric/core'
import { FieldComponent } from '../../form/types'

export const TextField: FieldComponent<string, Record<string, never>> = ({ name, onChange, value, disabled, onBlur }) => (
  <Input
    type="string"
    value={value}
    onChange={e => onChange(e.target.value)}
    name={name}
    disabled={disabled}
    onBlur={onBlur}
  />
)
