Gazebo_simulation-Frontend/node_modules/react-bootstrap/cjs/CloseButton.js
2020-12-21 10:29:31 -05:00

48 lines
1.5 KiB
JavaScript

"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.default = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _react = _interopRequireDefault(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var propTypes = {
label: _propTypes.default.string.isRequired,
onClick: _propTypes.default.func
};
var defaultProps = {
label: 'Close'
};
var CloseButton = _react.default.forwardRef(function (_ref, ref) {
var label = _ref.label,
onClick = _ref.onClick,
className = _ref.className,
props = (0, _objectWithoutPropertiesLoose2.default)(_ref, ["label", "onClick", "className"]);
return _react.default.createElement("button", (0, _extends2.default)({
ref: ref,
type: "button",
className: (0, _classnames.default)('close', className),
onClick: onClick
}, props), _react.default.createElement("span", {
"aria-hidden": "true"
}, "\xD7"), _react.default.createElement("span", {
className: "sr-only"
}, label));
});
CloseButton.displayName = 'CloseButton';
CloseButton.propTypes = propTypes;
CloseButton.defaultProps = defaultProps;
var _default = CloseButton;
exports.default = _default;
module.exports = exports["default"];