qpp-style 9.16.6 → 9.16.8

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.
@@ -23,6 +23,7 @@ const NavLinkDrawer = ({
23
23
  isHighlighted,
24
24
  darkerBackground,
25
25
  leftBorderHighlightDisabled,
26
+ hideLabelSection,
26
27
  largerDrawerBottomPadding
27
28
  }) => {
28
29
  const [isOpen, setIsOpen] = useState(openByDefault);
@@ -102,6 +103,10 @@ const NavLinkDrawer = ({
102
103
  return leftBorderHighlightDisabled ? 'left-border-disabled' : ''
103
104
  }
104
105
 
106
+ const isLabelSectionHidden = (hideLabelSection) => {
107
+ return hideLabelSection ? 'hidden-label-section' : '';
108
+ }
109
+
105
110
  const isHiddenWhileCollapsed = (isLeftBorderDisabled, isExpanded) => {
106
111
  return isLeftBorderDisabled && !isExpanded ? 'hidden-nav-link-item' : '';
107
112
  }
@@ -190,6 +195,7 @@ const NavLinkDrawer = ({
190
195
  : {})}
191
196
  className={`${className} ${expandedClass} ${highlightTitle(isHighlighted)} ${hasDarkerTitle(darkerBackground)}
192
197
  ${currentPage ? 'currentPage' : ''} ${isLeftBorderHighlightDisabled(leftBorderHighlightDisabled)}
198
+ ${isLabelSectionHidden(hideLabelSection)}
193
199
  ${isHiddenWhileCollapsed(leftBorderHighlightDisabled, isExpanded)}`}
194
200
  >
195
201
  <div className={isExpanded ? 'link-body' : 'link-body collapsed'}>
@@ -243,6 +249,7 @@ NavLinkDrawer.propTypes = {
243
249
  isHighlighted: PropTypes.bool,
244
250
  darkerBackground: PropTypes.bool,
245
251
  leftBorderHighlightDisabled: PropTypes.bool,
252
+ hideLabelSection: PropTypes.bool,
246
253
  largerDrawerBottomPadding: PropTypes.bool
247
254
  };
248
255
 
@@ -78,13 +78,10 @@ const SideNavUI = ({
78
78
  );
79
79
  };
80
80
 
81
- const getDynamicContent = (contentItems, className, recursionId, hideLinkClass) => {
81
+ const getDynamicContent = (contentItems, className, recursionId) => {
82
82
  const { openDrawersByDefault, linkActiveFunc, linkCallback, useTooltips } =
83
83
  config;
84
84
  let linkClass = isExpandedState ? 'link-inline' : 'link-collapsed';
85
- if (hideLinkClass) {
86
- linkClass = '';
87
- }
88
85
  const containerRecursionId = recursionId || 0;
89
86
 
90
87
  const getDynamicIcon = (icon) => {
@@ -108,8 +105,7 @@ const SideNavUI = ({
108
105
  container: getDynamicContent(
109
106
  item.items,
110
107
  item.className,
111
- containerRecursionId + 1,
112
- item.hideLinkClass
108
+ containerRecursionId + 1
113
109
  ),
114
110
  linkBack: (
115
111
  <AnimationGroup display={isExpandedState} key={key}>
@@ -183,6 +179,7 @@ const SideNavUI = ({
183
179
  isHighlighted={item.isHighlighted}
184
180
  darkerBackground={item.darkerBackground}
185
181
  leftBorderHighlightDisabled={item.leftBorderHighlightDisabled}
182
+ hideLabelSection={item.hideLabelSection}
186
183
  largerDrawerBottomPadding={item.largerDrawerBottomPadding}
187
184
  />
188
185
  ),