Gazebo_simulation-Frontend/node_modules/.cache/babel-loader/e2f9d3567e1033d60110e50e4fd0d2bc.json
2020-12-31 20:18:50 +00:00

1 line
2.3 KiB
JSON

{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, tagPropType } from './utils';\nvar propTypes = {\n tag: tagPropType,\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func, PropTypes.string]),\n disabled: PropTypes.bool,\n active: PropTypes.bool,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n onClick: PropTypes.func,\n href: PropTypes.any\n};\nvar defaultProps = {\n tag: 'a'\n};\n\nvar NavLink = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(NavLink, _React$Component);\n\n function NavLink(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.onClick = _this.onClick.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n var _proto = NavLink.prototype;\n\n _proto.onClick = function onClick(e) {\n if (this.props.disabled) {\n e.preventDefault();\n return;\n }\n\n if (this.props.href === '#') {\n e.preventDefault();\n }\n\n if (this.props.onClick) {\n this.props.onClick(e);\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n className = _this$props.className,\n cssModule = _this$props.cssModule,\n active = _this$props.active,\n Tag = _this$props.tag,\n innerRef = _this$props.innerRef,\n attributes = _objectWithoutPropertiesLoose(_this$props, [\"className\", \"cssModule\", \"active\", \"tag\", \"innerRef\"]);\n\n var classes = mapToCssModules(classNames(className, 'nav-link', {\n disabled: attributes.disabled,\n active: active\n }), cssModule);\n return React.createElement(Tag, _extends({}, attributes, {\n ref: innerRef,\n onClick: this.onClick,\n className: classes\n }));\n };\n\n return NavLink;\n}(React.Component);\n\nNavLink.propTypes = propTypes;\nNavLink.defaultProps = defaultProps;\nexport default NavLink;","map":null,"metadata":{},"sourceType":"module"}