import React, { FC } from 'react';
import { typeHelpers } from '../../shared';
import { BaseInput } from '../BaseInput';

type BaseInputProps = React.ComponentProps<typeof BaseInput>;

export interface Props
  extends typeHelpers.Omit<BaseInputProps, 'onChange' | 'onFocus' | 'onBlur'> {
  value?: string;
  onChange?: (e: any) => void;
  onFocus?: (e: any) => void;
  onBlur?: (e: any) => void;
}

export const TextInput: FC<Props> = props => {
  const { name, ...otherProps } = props;

  return <BaseInput type="text" id={name} {...otherProps} />;
  // return <div>INPUT</div>;
};
