UNPKG

@talend/react-bootstrap

Version:

Bootstrap 3 components built with React

34 lines 847 B
import PropTypes from 'prop-types'; import React from 'react'; import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; const propTypes = { label: PropTypes.string.isRequired, onClick: PropTypes.func }; const defaultProps = { label: 'Close' }; class CloseButton extends React.Component { render() { const { label, onClick } = this.props; return /*#__PURE__*/_jsxs("button", { type: "button", className: "close", onClick: onClick, children: [/*#__PURE__*/_jsx("span", { "aria-hidden": "true", children: "\xD7" }), /*#__PURE__*/_jsx("span", { className: "sr-only", children: label })] }); } } CloseButton.propTypes = propTypes; CloseButton.defaultProps = defaultProps; export default CloseButton; //# sourceMappingURL=CloseButton.js.map