import * as React from 'react';
import { createInput } from '..';
import './index.less';

export const TextFieldInput = ({ className, value, onChange, onFocus, onBlur, ...rest }: React.HTMLProps<HTMLInputElement>) => (
    <input
        {...rest}
        value={value}
        onChange={onChange}
        onFocus={onFocus}
        onBlur={onBlur}
        type="text"
        className={`text-field ${className}`}
    />
);

TextFieldInput.defaultProps = {
    className: '',
};

export const TextField = createInput(TextFieldInput);
