diff --git a/src/components/ha-icon-overflow-menu.ts b/src/components/ha-icon-overflow-menu.ts index baa5db8fcf..b526e48e24 100644 --- a/src/components/ha-icon-overflow-menu.ts +++ b/src/components/ha-icon-overflow-menu.ts @@ -5,11 +5,13 @@ import { customElement, property } from "lit/decorators"; import { classMap } from "lit/directives/class-map"; import { haStyle } from "../resources/styles"; import type { HomeAssistant } from "../types"; -import "./ha-button-menu"; +import "./ha-md-button-menu"; import "./ha-icon-button"; import "./ha-list-item"; import "./ha-svg-icon"; import "./ha-tooltip"; +import "./ha-md-menu-item"; +import "./ha-md-divider"; export interface IconOverflowMenuItem { [key: string]: any; @@ -35,11 +37,9 @@ export class HaIconOverflowMenu extends LitElement { return html` ${this.narrow ? html` - item.divider - ? html`
  • ` - : html`` + : html` -
    - -
    + ${item.label} -
    ` + ` )} -
    ` + ` : html` ${this.items.map((item) => @@ -91,20 +92,6 @@ export class HaIconOverflowMenu extends LitElement { protected _handleIconOverflowMenuOpened(e) { e.stopPropagation(); - // If this component is used inside a data table, the z-index of the row - // needs to be increased. Otherwise the ha-button-menu would be displayed - // underneath the next row in the table. - const row = this.closest(".mdc-data-table__row") as HTMLDivElement | null; - if (row) { - row.style.zIndex = "1"; - } - } - - protected _handleIconOverflowMenuClosed() { - const row = this.closest(".mdc-data-table__row") as HTMLDivElement | null; - if (row) { - row.style.zIndex = ""; - } } static get styles() { @@ -115,16 +102,10 @@ export class HaIconOverflowMenu extends LitElement { display: flex; justify-content: flex-end; } - li[role="separator"] { - border-bottom-color: var(--divider-color); - } div[role="separator"] { border-right: 1px solid var(--divider-color); width: 1px; } - ha-list-item[disabled] ha-svg-icon { - color: var(--disabled-text-color); - } `, ]; }