Skip to content

Commit

Permalink
fix: re-enable displaying the top level All link if PL isn't config…
Browse files Browse the repository at this point in the history
…ured to hide this specific link in the ishControlsHide config option. Addresses #1048
  • Loading branch information
sghoweri committed Sep 5, 2019
1 parent a368459 commit 6bb4e1a
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions packages/uikit-workshop/src/scripts/components/pl-nav/pl-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -572,16 +572,23 @@ class Nav extends BaseComponent {
);
})}

{/* <li class="pl-c-nav__item">
<a
href="styleguide/html/styleguide.html"
class="pl-c-nav__link pl-c-nav__link--pattern"
data-patternpartial="all"
tabindex="0"
>
All
</a>
</li> */}
{/* 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 */}
{(window.ishControls === undefined ||
window.ishControls.ishControlsHide === undefined ||
(window.ishControls.ishControlsHide['views-all'] !== true &&
window.ishControls.ishControlsHide.all !== true)) && (
<li class="pl-c-nav__item">
<a
onClick={e => this.handleClick(e, 'all')}
href="styleguide/html/styleguide.html"
class="pl-c-nav__link pl-c-nav__link--pattern"
data-patternpartial="all"
tabindex="0"
>
All
</a>
</li>
)}
</ol>
);
}
Expand Down

0 comments on commit 6bb4e1a

Please sign in to comment.