'use strict';

exports.__esModule = true;

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _propTypes = require('prop-types');

var _propTypes2 = _interopRequireDefault(_propTypes);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var Heading = function Heading(props) {
  var Element = 'h' + props.level;
  return _react2.default.createElement(
    Element,
    { className: props.class },
    props.text
  );
};

Heading.propTypes = process.env.NODE_ENV !== "production" ? {
  /** The heading text  */
  text: _propTypes2.default.string.isRequired,
  /** The heading level */
  level: _propTypes2.default.number,
  /** A passable heading classname */
  class: _propTypes2.default.string
} : {};

Heading.defaultProps = {
  level: 1
};

exports.default = Heading;
module.exports = exports['default'];