Skip to content

Commit

Permalink
Update logic of numberIndicator and stories
Browse files Browse the repository at this point in the history
  • Loading branch information
evangeliaPanteliadou committed Jan 17, 2025
1 parent 9db9f18 commit 0b22755
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -303,15 +303,15 @@ export class SidebarItem {
<slot />
</div>
{
(this.isExpandable || (this.numberIndicator !== null && this.numberIndicator !== 0)) &&
(this.isExpandable || (this.numberIndicator !== undefined && this.numberIndicator !== null && !isNaN(this.numberIndicator))) &&
<div class="sidebar__nav-item-indicator">
{this.isExpandable &&
<span class='item__arrow-wrapper'>
<ifx-icon icon="chevron-down-12" />
</span>
}

{this.numberIndicator != null && !this.isExpandable && !this.isNested &&
{this.numberIndicator != undefined && this.numberIndicator !== null && !isNaN(this.numberIndicator) && !this.isExpandable && !this.isNested &&
<span class='item__number-indicator'>
<ifx-number-indicator>{this.numberIndicator}</ifx-number-indicator>
</span>}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ export const WithSubmenu = SubmenuTemplate.bind({});

const NumberIndicatorTemplate = () =>
`<ifx-sidebar application-name="Application name">
<ifx-sidebar-item icon="image-16" number-indicator="5">Menu Item</ifx-sidebar-item>
<ifx-sidebar-item icon="image-16" number-indicator="1">Menu Item</ifx-sidebar-item>
<ifx-sidebar-item icon="image-16" number-indicator="23">Menu Item</ifx-sidebar-item>
<ifx-sidebar-item icon="image-16" number-indicator=5>Menu Item</ifx-sidebar-item>
<ifx-sidebar-item icon="image-16" number-indicator=1>Menu Item</ifx-sidebar-item>
<ifx-sidebar-item icon="image-16" number-indicator=23>Menu Item</ifx-sidebar-item>
<ifx-sidebar-item active="false">
Header Section
<ifx-sidebar-item icon="image-16" active="false" >
Expand Down

0 comments on commit 0b22755

Please sign in to comment.