{"size": 640, "ext": "js", "max_stars_repo_path": "src/ComponentWrapper.js", "max_stars_repo_name": "wreulicke/react-markdown-sandbox", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/ComponentWrapper.js", "max_issues_repo_name": "wreulicke/react-markdown-sandbox", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/ComponentWrapper.js", "max_forks_repo_name": "wreulicke/react-markdown-sandbox", "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": 24.6153846154, "max_line_length": 70, "alphanum_fraction": 0.5578125}
const React = require("react")
const generator = require("./IdGenerator")
module.exports = (tagName, tag) => {
  const className = tagName.indexOf("h") == 0 ? "markdown-header" : ""
  class Wrap extends React.Component {
    componentWillMount() {
      this.state = {
        id: generator.next().value,
        show: true,
        hide: false,
      }
    }
    componentWillUpdate() {}
    render() {
      const { id } = this.state
      const props = {
        key: `content-${id}`,
        className: className,
        ...this.props,
      }
      return <span className={this.state.id}>{tag(props)}</span>
    }
  }
  return Wrap
}
