MCPcopy Create free account
hub / github.com/docker/getting-started / Navbar

Function Navbar

app/src/static/js/react-bootstrap.js:15012–15047  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15010 _inheritsLoose(Navbar, _React$Component);
15011
15012 function Navbar() {
15013 var _this;
15014
15015 for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {
15016 _args[_key] = arguments[_key];
15017 }
15018
15019 _this = _React$Component.call.apply(_React$Component, [this].concat(_args)) || this;
15020
15021 _this.handleCollapse = function () {
15022 var _this$props = _this.props,
15023 onToggle = _this$props.onToggle,
15024 expanded = _this$props.expanded,
15025 collapseOnSelect = _this$props.collapseOnSelect,
15026 onSelect = _this$props.onSelect;
15027 if (onSelect) onSelect.apply(void 0, arguments);
15028
15029 if (collapseOnSelect && expanded) {
15030 onToggle(false);
15031 }
15032 };
15033
15034 _this.handleToggle = function () {
15035 var _this$props2 = _this.props,
15036 onToggle = _this$props2.onToggle,
15037 expanded = _this$props2.expanded;
15038 onToggle(!expanded);
15039 };
15040
15041 _this.state = {
15042 navbarContext: {
15043 onToggle: _this.handleToggle
15044 }
15045 };
15046 return _this;
15047 }
15048
15049 Navbar.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {
15050 var bsPrefix = _ref.bsPrefix,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…