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 pattern-lab#1048
  • Loading branch information
sghoweri committed Sep 5, 2019
1 parent 7a9d09c commit 36006c5
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 36006c5

Please sign in to comment.