text: import React from 'react';
  import classnames from 'classnames';
  import PropTypes from 'prop-types';
  
  import isEmpty from '../../validation/isEmpty';
  
  const TextFieldGroup = ({
  	name,
  	placeholder,
  	value,
  	label,
  	error,
  	info,
  	type,
  	onChange,
  	disabled
  }) => {
  	return (
  		<div className="form-group">
        <input 
        	type={type}
        	className={classnames('form-control form-control-lg', {
        		'is-invalid': !isEmpty(error)
        	})}
        	placeholder={placeholder}
        	name={name}
        	value={value}
        	onChange={onChange}
        	disabled={disabled}
        />
        {info && <small className="form-text text-muted">{info}</small>}
        {!isEmpty(error) && (<div className="invalid-feedback">{error}</div>)}
      </div>
  	)
  }
  
  TextFieldGroup.propTypes = {
  	name: PropTypes.string.isRequired,
  	placeholder: PropTypes.string,
  	value: PropTypes.string.isRequired,
  	info: PropTypes.string,
  	error: PropTypes.array,
  	type: PropTypes.string.isRequired,
  	onChange: PropTypes.func.isRequired,
  	disabled: PropTypes.string,
  }
  
  TextFieldGroup.defaultProps = {
  	type: 'text'
  }
  
  export default TextFieldGroup;