"use strict";

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

var _react = _interopRequireDefault(require("react"));

var _propTypes = _interopRequireDefault(require("prop-types"));

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

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

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

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

const {
  Button
} = _cspaceInput.components;
const messages = (0, _reactIntl.defineMessages)({
  label: {
    "id": "closeButton.label",
    "defaultMessage": "Close"
  }
});
const propTypes = {
  onClick: _propTypes.default.func
};

function CloseButton(props) {
  const {
    onClick
  } = props;
  return _react.default.createElement(Button, {
    className: _CloseButton.default.common,
    icon: true,
    name: "close",
    onClick: onClick
  }, _react.default.createElement(_reactIntl.FormattedMessage, messages.label));
}

CloseButton.propTypes = propTypes;