{"size": 690, "ext": "js", "max_stars_repo_path": "components/AddUser.js", "max_stars_repo_name": "osterbergmarcus/userman", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "components/AddUser.js", "max_issues_repo_name": "osterbergmarcus/userman", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "components/AddUser.js", "max_forks_repo_name": "osterbergmarcus/userman", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23.7931034483, "max_line_length": 65, "alphanum_fraction": 0.6086956522}
import React, { Component, PropTypes } from 'react'

// Presentational component
const AddUser = ({ handleChange, submitUser, text, users }) => {
    return (
      <div className="container">
        <input 
          type="text"
          id="user"
          value={text}
          onChange={(event) => handleChange(event)}
          placeholder="add user"
        />
        <button className="add" onClick={submitUser}>Add</button>
        <div className="user-count">Users: {users}</div>
      </div>
    )
}

export default AddUser

// propTypes
AddUser.propTypes = {
  handleChange: PropTypes.func,
  submitUser: PropTypes.func,
  text: PropTypes.string,
  users: PropTypes.number
}
