'use strict';

exports.__esModule = true;

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

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

var _propTypes2 = _interopRequireDefault(_propTypes);

require('./style.css');

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

var SidebarHeading = function SidebarHeading(props) {
  var sidebarHeading = props;
  var Element = 'h' + (sidebarHeading.level || 2);

  return _react2.default.createElement(
    Element,
    { className: 'ma__sidebar-heading' },
    sidebarHeading.title
  );
};

SidebarHeading.propTypes = process.env.NODE_ENV !== "production" ? {
  /** The heading level e.g. H1, H2, etc. */
  level: _propTypes2.default.number,
  /**  The title text shown by the heading */
  title: _propTypes2.default.string
} : {};

SidebarHeading.defaultProps = {
  level: 2,
  title: ''
};

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