dibk-design 2.6.2 → 2.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -67,7 +67,7 @@ var NavigationBar = function NavigationBar(props) {
67
67
  });
68
68
  }
69
69
  });
70
- return _react.default.createElement("ul", {
70
+ return !!(listItems !== null && listItems !== void 0 && listItems.length) && _react.default.createElement("ul", {
71
71
  className: _NavigationBarModule.default.primaryList
72
72
  }, listItems);
73
73
  };
@@ -79,7 +79,7 @@ var NavigationBar = function NavigationBar(props) {
79
79
  theme: props.theme
80
80
  });
81
81
  });
82
- return _react.default.createElement("ul", {
82
+ return !!(listItems !== null && listItems !== void 0 && listItems.length) && _react.default.createElement("ul", {
83
83
  className: _NavigationBarModule.default.secondaryList
84
84
  }, listItems);
85
85
  };
@@ -106,6 +106,7 @@ var NavigationBar = function NavigationBar(props) {
106
106
  var hamburgerIconLineStyle = {
107
107
  backgroundColor: (0, _theme.getThemeNavigationBarTextColor)(props.theme)
108
108
  };
109
+ var hasListItems = !!((_props$primaryListIte = props.primaryListItems) !== null && _props$primaryListIte !== void 0 && _props$primaryListIte.length) || !!((_props$secondaryListI = props.secondaryListItems) !== null && _props$secondaryListI !== void 0 && _props$secondaryListI.length);
109
110
  return _react.default.createElement("header", null, _react.default.createElement("div", {
110
111
  className: _NavigationBarModule.default.isPresent
111
112
  }, _react.default.createElement("div", {
@@ -113,9 +114,9 @@ var NavigationBar = function NavigationBar(props) {
113
114
  style: navigationBarThemeStyle
114
115
  }, _react.default.createElement("div", {
115
116
  className: _NavigationBarModule.default.logoContainer
116
- }, renderLogo(props.logoLink)), props.children ? _react.default.createElement("div", {
117
+ }, renderLogo(props.logoLink)), !!props.children && _react.default.createElement("div", {
117
118
  className: _NavigationBarModule.default.childElements
118
- }, props.children) : null, !!((_props$primaryListIte = props.primaryListItems) !== null && _props$primaryListIte !== void 0 && _props$primaryListIte.length) || !!((_props$secondaryListI = props.secondaryListItems) !== null && _props$secondaryListI !== void 0 && _props$secondaryListI.length) ? _react.default.createElement("button", {
119
+ }, props.children), hasListItems && _react.default.createElement("button", {
119
120
  type: "button",
120
121
  className: "".concat(_NavigationBarModule.default.menuToggle, " ").concat(active ? _NavigationBarModule.default.active : ""),
121
122
  onClick: function onClick() {
@@ -134,15 +135,15 @@ var NavigationBar = function NavigationBar(props) {
134
135
  }), _react.default.createElement("span", {
135
136
  className: _NavigationBarModule.default.line,
136
137
  style: hamburgerIconLineStyle
137
- }))) : null), _react.default.createElement("div", {
138
+ })))), hasListItems && _react.default.createElement(_react.Fragment, null, _react.default.createElement("div", {
138
139
  className: "".concat(_NavigationBarModule.default.dropdownContainer, " ").concat(active ? _NavigationBarModule.default.active : "")
139
140
  }, _react.default.createElement("div", {
140
141
  id: "main-menu-dropdown",
141
142
  className: _NavigationBarModule.default.dropdown,
142
143
  style: navigationBarThemeStyle
143
- }, renderPrimaryList(), renderSecondaryList(), props.children)), _react.default.createElement("div", {
144
+ }, renderPrimaryList(), renderSecondaryList())), _react.default.createElement("div", {
144
145
  className: "".concat(_NavigationBarModule.default.dropdownOverlay, " ").concat(active ? _NavigationBarModule.default.active : "")
145
- })));
146
+ }))));
146
147
  };
147
148
  NavigationBar.propTypes = {
148
149
  primaryListItems: _propTypes.default.array,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dibk-design",
3
- "version": "2.6.2",
3
+ "version": "2.6.3",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",