{"size": 597, "ext": "js", "max_stars_repo_path": "src/components/question.js", "max_stars_repo_name": "DanielMSchmidt/Study-Starter", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/components/question.js", "max_issues_repo_name": "DanielMSchmidt/Study-Starter", "max_issues_repo_issues_event_min_datetime": "2018-05-22T07:41:00.000Z", "max_issues_repo_issues_event_max_datetime": "2018-05-22T07:41:00.000Z", "max_forks_repo_path": "src/components/question.js", "max_forks_repo_name": "DanielMSchmidt/Study-Starter", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 21.3214285714, "max_line_length": 87, "alphanum_fraction": 0.5661641541}
import React from 'react';
import './question.scss';

class Question extends React.Component {
  static propTypes = {
    answer: React.PropTypes.number,
    options: React.PropTypes.array,
    question: React.PropTypes.string,
  }
  render() {
    const {
      answer,
      options,
      question,
    } = this.props;
    return (
      <div className="question">
        <p>{question}</p>
        <ul>{options.map((option, index) => (
            <li key={index} className={index === answer ? 'correct' : ''}>{option}</li>
        ))}</ul>
      </div>
    );
  }
}

export default Question;
