'use strict';

exports.__esModule = true;

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

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

var _propTypes2 = _interopRequireDefault(_propTypes);

var _CloseIcon = require('../CloseIcon');

var _CloseIcon2 = _interopRequireDefault(_CloseIcon);

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

var ModalHeader = function ModalHeader(props) {
  return _react2.default.createElement(
    'div',
    { className: 'cui-modal__header ' + props.className },
    _react2.default.createElement(
      'span',
      { className: 'cui-modal__title' },
      props.headerLabel
    ),
    props.showCloseButton && _react2.default.createElement(_CloseIcon2.default, { onClick: props.onHide, className: 'cui-modal__close' })
  );
};

ModalHeader.defaultProps = {
  className: '',
  headerLabel: '',
  onHide: null,
  showCloseButton: true
};

ModalHeader.displayName = 'ModalHeader';

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