import React from 'react';
import PropTypes from 'prop-types';

var Paragraph = function Paragraph(paragraph) {
  return (
    /* eslint-disable-next-line react/no-danger */
    React.createElement('p', { className: paragraph.className, dangerouslySetInnerHTML: { __html: paragraph.text || paragraph.children } })
  );
};

Paragraph.propTypes = process.env.NODE_ENV !== "production" ? {
  /** The text displayed. */
  text: PropTypes.string,
  /** A custom class. */
  className: PropTypes.string
} : {};

export default Paragraph;