Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions src/components/menu-item/menu-item.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,30 @@ export const iconsBoth = (): string => html` <calcite-menu>
/>
</calcite-menu>`;

export const allIconsAndSubMenu_TestOnly = (): string => html` <calcite-menu>
<calcite-menu-item text="Example item 1" text-enabled></calcite-menu-item>
<calcite-menu-item text="Example item 2" text-enabled active></calcite-menu-item>
<calcite-menu-item text="Example item 3" text-enabled icon-start="layer" icon-end="layer" breadcrumb>
<calcite-menu-item slot="submenu-item" text="Example submenu item 1" text-enabled> </calcite-menu-item>
<calcite-menu-item slot="submenu-item" text="Example submenu item 2" text-enabled>
<calcite-menu-item slot="submenu-item" text="Example submenu item 1" text-enabled></calcite-menu-item>
</calcite-menu-item>
</calcite-menu-item>
<calcite-menu-item text="Example item 4" text-enabled></calcite-menu-item
></calcite-menu>`;

export const allIconsAndSubMenuVertical_TestOnly = (): string => html`<calcite-menu layout="vertical">
<calcite-menu-item text="Example item 1" text-enabled></calcite-menu-item>
<calcite-menu-item text="Example item 2" text-enabled active></calcite-menu-item>
<calcite-menu-item text="Example item 3" text-enabled icon-start="layer" icon-end="layer" breadcrumb>
<calcite-menu-item slot="submenu-item" text="Example submenu item 1" text-enabled> </calcite-menu-item>
<calcite-menu-item slot="submenu-item" text="Example submenu item 2" text-enabled>
<calcite-menu-item slot="submenu-item" text="Example submenu item 1" text-enabled></calcite-menu-item>
</calcite-menu-item>
</calcite-menu-item>
<calcite-menu-item text="Example item 4" text-enabled></calcite-menu-item>
</calcite-menu>`;

export const darkModeRTL_TestOnly = (): string =>
html`<calcite-menu-item
text="Menu item"
Expand Down
4 changes: 2 additions & 2 deletions src/components/menu-item/menu-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -444,9 +444,9 @@ export class CalciteMenuItem implements LoadableComponent, T9nComponent, Localiz
<div class={CSS.textContainer}>
<span>{this.text}</span>
</div>
{!this.href && this.hasSubmenu ? this.renderDropdownIcon(dir) : null}
{this.breadcrumb ? this.renderBreadcrumbIcon(dir) : null}
{this.iconEnd && this.renderIconEnd()}
{this.breadcrumb ? this.renderBreadcrumbIcon(dir) : null}
{!this.href && this.hasSubmenu ? this.renderDropdownIcon(dir) : null}
</Fragment>
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/demos/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ <h3>
</calcite-menu-item>
</calcite-menu-item>
</calcite-menu-item>
<calcite-menu-item text="Example nested" icon-start="layer">
<calcite-menu-item text="Example nested" icon-start="layer" icon-end="layer">
<calcite-menu-item slot="submenu-item" title text="ArcGIS Online">
<calcite-menu-item slot="submenu-item" text="Great examples"> </calcite-menu-item>
<calcite-menu-item slot="submenu-item" text="Capabilities">
Expand Down