import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";

/**
 * ModalHeader.jsx
 *
 * @Author: jruif
 * @Date: 2017/7/7 下午10:02
 */
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
/**
 * @ignore
 * */

var ModalHeader = function ModalHeader(props) {
  var children = props.children,
      prefixCls = props.prefixCls,
      className = props.className,
      Component = props.component,
      closeButton = props.closeButton;
  var classes = classNames("".concat(prefixCls, "-header"), className, _defineProperty({}, "".concat(prefixCls, "-header-has-title"), children));
  return React.createElement("div", {
    className: classes
  }, React.createElement(Component, {
    className: "".concat(prefixCls, "-title")
  }, children), closeButton);
};

ModalHeader.propTypes = {
  children: PropTypes.node,
  className: PropTypes.string
};
ModalHeader.defaultProps = {
  component: 'h6',
  prefixCls: 'ne-modal'
};
export default ModalHeader;