{"size": 555, "ext": "js", "max_stars_repo_path": "src/shared/atoms/BodyText/BodyText.js", "max_stars_repo_name": "lrivett-we/plato-multilanguage-prototype", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/shared/atoms/BodyText/BodyText.js", "max_issues_repo_name": "lrivett-we/plato-multilanguage-prototype", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/shared/atoms/BodyText/BodyText.js", "max_forks_repo_name": "lrivett-we/plato-multilanguage-prototype", "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": 21.3461538462, "max_line_length": 109, "alphanum_fraction": 0.6522522523}
import React, { PureComponent } from "react";
import styles from "./BodyText.module.scss";
import PropTypes from "prop-types";

const typeClassNames = {
  large: "BodyLarge",
  main: "BodyMain",
  small: "BodySmall",
};

class BodyText extends PureComponent {
  render() {
    return (
      <p className={`${styles.BodyText} ${styles[typeClassNames[this.props.type]]} ${this.props.className}`}>
        {this.props.children}
      </p>
    )
  }
}

BodyText.propTypes = {
  type: PropTypes.oneOf(["large", "main", "small"]),
};

export default BodyText;
