{"size": 599, "ext": "js", "max_stars_repo_path": "client/modules/Post/components/Collections/ListItem.js", "max_stars_repo_name": "jessicarobins/det", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "client/modules/Post/components/Collections/ListItem.js", "max_issues_repo_name": "jessicarobins/det", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "client/modules/Post/components/Collections/ListItem.js", "max_forks_repo_name": "jessicarobins/det", "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": 20.6551724138, "max_line_length": 63, "alphanum_fraction": 0.6293823038}
import React, { Component, PropTypes } from 'react';
import * as _ from 'lodash';

class ListItem extends Component {
  
  setTemplate = () => {
    this.props.addSelectedTemplate(this.props.template.name);  
  }
  
  render() {
    return (
      <li>
        <i className="fa-li fa fa-angle-right"></i>
        <a onClick={this.setTemplate}>
          {this.props.template.name}</a>
      </li>
    );
  }
}

ListItem.propTypes = {
  template: PropTypes.shape({
    name: PropTypes.string.isRequired,
  }).isRequired,
  addSelectedTemplate: PropTypes.func.isRequired,
};

export default ListItem;
