You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1 line
1.2 KiB

  1. {"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport React, { Component } from 'react';\nimport Alert from './Alert';\n\nvar UncontrolledAlert = /*#__PURE__*/function (_Component) {\n _inheritsLoose(UncontrolledAlert, _Component);\n\n function UncontrolledAlert(props) {\n var _this;\n\n _this = _Component.call(this, props) || this;\n _this.state = {\n isOpen: true\n };\n _this.toggle = _this.toggle.bind(_assertThisInitialized(_assertThisInitialized(_this)));\n return _this;\n }\n\n var _proto = UncontrolledAlert.prototype;\n\n _proto.toggle = function toggle() {\n this.setState({\n isOpen: !this.state.isOpen\n });\n };\n\n _proto.render = function render() {\n return React.createElement(Alert, _extends({\n isOpen: this.state.isOpen,\n toggle: this.toggle\n }, this.props));\n };\n\n return UncontrolledAlert;\n}(Component);\n\nexport default UncontrolledAlert;","map":null,"metadata":{},"sourceType":"module"}