import React from 'react';
import PropTypes from 'prop-types';
import './style.css';

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

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

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

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

export default SidebarHeading;