{"size": 546, "ext": "js", "max_stars_repo_path": "src/Components/MarkdownInput/index.js", "max_stars_repo_name": "ibleedfilm/markdown-preview", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/Components/MarkdownInput/index.js", "max_issues_repo_name": "ibleedfilm/markdown-preview", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/Components/MarkdownInput/index.js", "max_forks_repo_name": "ibleedfilm/markdown-preview", "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.2222222222, "max_line_length": 51, "alphanum_fraction": 0.6556776557}
import React, { PropTypes } from 'react';

import style from './style.scss';

const MarkdownInput = ({ text, handleChange }) => {
  const handleTextAreaChange = (event) => {
    handleChange(event.target.value);
  }

  return (
    <form className="markdown-input">
      <textarea
        className="form-control"
        value={text}
        onChange={handleTextAreaChange}
      />
    </form>
  );
}

MarkdownInput.propTypes = {
  text: PropTypes.string.isRequired,
  handleChange: PropTypes.func.isRequired
};

export default MarkdownInput;
