'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = CloseButton;

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

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

var _propTypes2 = _interopRequireDefault(_propTypes);

var _reactIntl = require('react-intl');

var _cspaceInput = require('cspace-input');

var _CloseButton = require('../../../styles/cspace-ui/CloseButton.css');

var _CloseButton2 = _interopRequireDefault(_CloseButton);

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

const Button = _cspaceInput.components.Button;


const messages = (0, _reactIntl.defineMessages)({
  label: {
    'id': 'closeButton.label',
    'defaultMessage': 'Close'
  }
});

const propTypes = {
  onClick: _propTypes2.default.func
};

function CloseButton(props) {
  const onClick = props.onClick;


  return _react2.default.createElement(
    Button,
    {
      className: _CloseButton2.default.common,
      icon: true,
      name: 'close',
      onClick: onClick
    },
    _react2.default.createElement(_reactIntl.FormattedMessage, messages.label)
  );
}

CloseButton.propTypes = propTypes;