Menu button simplify (#2930)

* Simplify the hass-menu button

* Purge showMenu boolean
This commit is contained in:
Paulus Schoutsen
2019-03-14 13:54:46 -07:00
committed by GitHub
parent 92e6c5adfd
commit 8785b03fd8
34 changed files with 74 additions and 331 deletions

View File

@@ -11,9 +11,6 @@ import { fireEvent } from "../common/dom/fire_event";
@customElement("ha-menu-button")
class HaMenuButton extends LitElement {
@property({ type: Boolean })
public showMenu = false;
@property({ type: Boolean })
public hassio = false;
@@ -33,7 +30,7 @@ class HaMenuButton extends LitElement {
}
private _toggleMenu(): void {
fireEvent(this, this.showMenu ? "hass-close-menu" : "hass-open-menu");
fireEvent(this, "hass-toggle-menu");
}
}