{"size": 606, "ext": "js", "max_stars_repo_path": "frontend/src/components/TextInput/TextInput.js", "max_stars_repo_name": "micromata/iFORP", "max_stars_repo_stars_event_min_datetime": "2019-03-18T14:52:12.000Z", "max_stars_repo_stars_event_max_datetime": "2019-04-30T09:48:55.000Z", "max_issues_repo_path": "frontend/src/components/TextInput/TextInput.js", "max_issues_repo_name": "micromata/iFORP", "max_issues_repo_issues_event_min_datetime": "2020-01-08T07:53:07.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-26T05:17:29.000Z", "max_forks_repo_path": "frontend/src/components/TextInput/TextInput.js", "max_forks_repo_name": "iFORP/iFORP", "max_forks_repo_forks_event_min_datetime": "2018-10-19T15:47:59.000Z", "max_forks_repo_forks_event_max_datetime": "2018-10-20T11:18:01.000Z"}
{"max_stars_count": 5, "max_issues_count": 9, "max_forks_count": 2, "avg_line_length": 18.9375, "max_line_length": 46, "alphanum_fraction": 0.6353135314}
import React from 'react';
import injectSheet from 'react-jss';
import styles from './TextInput.styles';

const TextInput = ({
  classes,
  value,
  placeholder,
  type = 'text',
  onChange,
  onBlur = _ => { },
  onKeyDown = _ => { },
  minLength = 5,
  maxLength = 20,
  refElement
}) => (
  <input
    type={type}
    ref={refElement}
    className={classes.textInput}
    placeholder={placeholder}
    value={value}
    onChange={onChange}
    onBlur={ onBlur }
    onKeyDown={ onKeyDown }
    minLength={ minLength }
    maxLength={ maxLength }
  />
);

export default injectSheet(styles)(TextInput);
