Skip to content

Commit 6bb4e1a

Browse files
committed
fix: re-enable displaying the top level All link if PL isn't configured to hide this specific link in the ishControlsHide config option. Addresses #1048
1 parent a368459 commit 6bb4e1a

File tree

1 file changed

+17
-10
lines changed
  • packages/uikit-workshop/src/scripts/components/pl-nav

1 file changed

+17
-10
lines changed

packages/uikit-workshop/src/scripts/components/pl-nav/pl-nav.js

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -572,16 +572,23 @@ class Nav extends BaseComponent {
572572
);
573573
})}
574574

575-
{/* <li class="pl-c-nav__item">
576-
<a
577-
href="styleguide/html/styleguide.html"
578-
class="pl-c-nav__link pl-c-nav__link--pattern"
579-
data-patternpartial="all"
580-
tabindex="0"
581-
>
582-
All
583-
</a>
584-
</li> */}
575+
{/* display the All link if window.ishControlsHide is undefined (for some reason) OR window.ishControls.ishControlsHide doesn't have `views-all` and/or `all` set to true */}
576+
{(window.ishControls === undefined ||
577+
window.ishControls.ishControlsHide === undefined ||
578+
(window.ishControls.ishControlsHide['views-all'] !== true &&
579+
window.ishControls.ishControlsHide.all !== true)) && (
580+
<li class="pl-c-nav__item">
581+
<a
582+
onClick={e => this.handleClick(e, 'all')}
583+
href="styleguide/html/styleguide.html"
584+
class="pl-c-nav__link pl-c-nav__link--pattern"
585+
data-patternpartial="all"
586+
tabindex="0"
587+
>
588+
All
589+
</a>
590+
</li>
591+
)}
585592
</ol>
586593
);
587594
}

0 commit comments

Comments
 (0)