import * as React from 'react';
import cx from 'classnames';
import Button from '../buttons/Button';
import Icon, { ICON_COLOR } from '../icons/Icon';

var DialogCloseButton = function DialogCloseButton(_ref) {
  var onClick = _ref.onClick,
      className = _ref.className,
      _ref$label = _ref.label,
      label = _ref$label === void 0 ? 'Close this dialog window' : _ref$label,
      dataTestId = _ref['data-testid'],
      disabled = _ref.disabled;
  return /*#__PURE__*/React.createElement(Button, {
    variant: "transparent",
    className: cx('sg-dialog__close-button', className),
    icon: /*#__PURE__*/React.createElement(Icon, {
      type: "close",
      color: ICON_COLOR['icon-black'],
      size: 24
    }),
    onClick: onClick,
    "aria-label": label,
    iconOnly: true,
    "data-testid": dataTestId,
    disabled: disabled,
    type: "button"
  });
};

export default DialogCloseButton;