<commit_before><commit_msg>se agrego un input customizable<commit_after>import React, { PropTypes } from 'react';

const Input = ({ styleClass, name, label, type, onChange, placeholder, value, error }) => {
  let wrapperClass = `form-group ${styleClass}`;

  if (error && error.length > 0) {
    wrapperClass += " " + 'has-error';
  }

  return (
    <div>
      <div className={wrapperClass}>
        <label className="input-label" htmlFor={name}>{label}</label>
        <div className="field">
          <input type={type}
                 name={name}
                 placeholder={placeholder}
                 value={value}
                 onChange={onChange}
                 className="form-control" />
          {error && <div className="alert alert-danger">{error}</div>}
        </div>
      </div>
    </div>
  );
};

const { string, func } = PropTypes;

Input.propTypes = {
  styleClass: string,
  name: string.isRequired,
  label: string.isRequired,
  type: string.isRequired,
  onChange: func.isRequired,
  placeholder: string.isRequired,
  value: string,
  error: string
};

export default Input;
{'fraction_non_alphanumeric': 0.14401440144014402, 'fraction_numerical': 0.0009000900090009, 'mean_word_length': 2.633986928104575, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1857766', 'n_tokens_mistral': 324, 'n_tokens_neox': 325, 'n_words': 76}