1 | import _inheritsLoose from "@babel/runtime-corejs2/helpers/esm/inheritsLoose";
|
2 | import PropTypes from 'prop-types';
|
3 | import React from 'react';
|
4 | var propTypes = {
|
5 | label: PropTypes.string.isRequired,
|
6 | onClick: PropTypes.func
|
7 | };
|
8 | var defaultProps = {
|
9 | label: 'Close'
|
10 | };
|
11 |
|
12 | var CloseButton =
|
13 |
|
14 | function (_React$Component) {
|
15 | _inheritsLoose(CloseButton, _React$Component);
|
16 |
|
17 | function CloseButton() {
|
18 | return _React$Component.apply(this, arguments) || this;
|
19 | }
|
20 |
|
21 | var _proto = CloseButton.prototype;
|
22 |
|
23 | _proto.render = function render() {
|
24 | var _this$props = this.props,
|
25 | label = _this$props.label,
|
26 | onClick = _this$props.onClick;
|
27 | return React.createElement("button", {
|
28 | type: "button",
|
29 | className: "close",
|
30 | onClick: onClick
|
31 | }, React.createElement("span", {
|
32 | "aria-hidden": "true"
|
33 | }, "\xD7"), React.createElement("span", {
|
34 | className: "sr-only"
|
35 | }, label));
|
36 | };
|
37 |
|
38 | return CloseButton;
|
39 | }(React.Component);
|
40 |
|
41 | CloseButton.propTypes = propTypes;
|
42 | CloseButton.defaultProps = defaultProps;
|
43 | export default CloseButton; |
\ | No newline at end of file |