Gazebo_simulation-Frontend/node_modules/.cache/babel-loader/56ecd4d0b0349784dd89aac1c208e8aa.json
2020-12-22 09:59:14 -05:00

1 line
2.7 KiB
JSON

{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _objectSpread2 from \"@babel/runtime/helpers/esm/objectSpread\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, tagPropType } from './utils';\nimport Fade from './Fade';\nvar propTypes = {\n children: PropTypes.node,\n className: PropTypes.string,\n closeClassName: PropTypes.string,\n closeAriaLabel: PropTypes.string,\n cssModule: PropTypes.object,\n color: PropTypes.string,\n fade: PropTypes.bool,\n isOpen: PropTypes.bool,\n toggle: PropTypes.func,\n tag: tagPropType,\n transition: PropTypes.shape(Fade.propTypes),\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.string, PropTypes.func])\n};\nvar defaultProps = {\n color: 'success',\n isOpen: true,\n tag: 'div',\n closeAriaLabel: 'Close',\n fade: true,\n transition: _objectSpread2({}, Fade.defaultProps, {\n unmountOnExit: true\n })\n};\n\nfunction Alert(props) {\n var className = props.className,\n closeClassName = props.closeClassName,\n closeAriaLabel = props.closeAriaLabel,\n cssModule = props.cssModule,\n Tag = props.tag,\n color = props.color,\n isOpen = props.isOpen,\n toggle = props.toggle,\n children = props.children,\n transition = props.transition,\n fade = props.fade,\n innerRef = props.innerRef,\n attributes = _objectWithoutPropertiesLoose(props, [\"className\", \"closeClassName\", \"closeAriaLabel\", \"cssModule\", \"tag\", \"color\", \"isOpen\", \"toggle\", \"children\", \"transition\", \"fade\", \"innerRef\"]);\n\n var classes = mapToCssModules(classNames(className, 'alert', \"alert-\" + color, {\n 'alert-dismissible': toggle\n }), cssModule);\n var closeClasses = mapToCssModules(classNames('close', closeClassName), cssModule);\n\n var alertTransition = _objectSpread2({}, Fade.defaultProps, {}, transition, {\n baseClass: fade ? transition.baseClass : '',\n timeout: fade ? transition.timeout : 0\n });\n\n return React.createElement(Fade, _extends({}, attributes, alertTransition, {\n tag: Tag,\n className: classes,\n in: isOpen,\n role: \"alert\",\n innerRef: innerRef\n }), toggle ? React.createElement(\"button\", {\n type: \"button\",\n className: closeClasses,\n \"aria-label\": closeAriaLabel,\n onClick: toggle\n }, React.createElement(\"span\", {\n \"aria-hidden\": \"true\"\n }, \"\\xD7\")) : null, children);\n}\n\nAlert.propTypes = propTypes;\nAlert.defaultProps = defaultProps;\nexport default Alert;","map":null,"metadata":{},"sourceType":"module"}