Skip to content

Commit

Permalink
feat: add dropdown part
Browse files Browse the repository at this point in the history
  • Loading branch information
peschee committed Apr 15, 2024
1 parent 73a53f3 commit fb2d211
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/fifty-timers-collect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@inventage-web-components/portal-navigation': minor
---

Add `dropdown` CSS part for the dropdown overlay
3 changes: 2 additions & 1 deletion packages/portal-navigation/src/PortalNavigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ type NavigationCssClasses = typeof NavigationCssClasses;
* @csspart current - Element wrapper for the current items (2nd level) container
* @csspart tree-container - Element wrapper for the tree items container (mobile breakpoint)
* @csspart navigation-header-container - Element for the navigation header in mobile breakpoint
* @csspart dropdown - Element for the dropdown overlay
*
* @csspart menu-tree - Element wrapper for the tree menu items (mobile breakpoint)
* @csspart menu-tree-main - Element wrapper for the tree menu items for the main menu (mobile breakpoint)
Expand Down Expand Up @@ -813,7 +814,7 @@ export class PortalNavigation extends LitElement {
@click="${() => this.__toggleDropdown(menuId)}"
>${PortalNavigation._createLinkTemplate(undefined, menuId, label, menu.icon, badge)}</span
>
<div class="dropdown ${classMap({ '-show': this.activeDropdown === menuId })}">
<div class="dropdown ${classMap({ '-show': this.activeDropdown === menuId })}" part="dropdown">
${menu.items.map(item => this._createFirstLevelItemTemplate(item, false, menuId))}
</div>`;
}
Expand Down

0 comments on commit fb2d211

Please sign in to comment.