Hide ha-icon-next if narrow (#10746)

This commit is contained in:
Joakim Sørensen 2021-12-01 09:23:13 +01:00 committed by GitHub
parent 1d97d8dca9
commit ac8f748656
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -95,6 +95,7 @@ class HaConfigDashboard extends LitElement {
? html` ? html`
<ha-config-navigation <ha-config-navigation
.hass=${this.hass} .hass=${this.hass}
.narrow=${this.narrow}
.showAdvanced=${this.showAdvanced} .showAdvanced=${this.showAdvanced}
.pages=${[ .pages=${[
{ {
@ -113,6 +114,7 @@ class HaConfigDashboard extends LitElement {
? html` ? html`
<ha-config-navigation <ha-config-navigation
.hass=${this.hass} .hass=${this.hass}
.narrow=${this.narrow}
.showAdvanced=${this.showAdvanced} .showAdvanced=${this.showAdvanced}
.pages=${[ .pages=${[
{ {
@ -130,6 +132,7 @@ class HaConfigDashboard extends LitElement {
: ""} : ""}
<ha-config-navigation <ha-config-navigation
.hass=${this.hass} .hass=${this.hass}
.narrow=${this.narrow}
.showAdvanced=${this.showAdvanced} .showAdvanced=${this.showAdvanced}
.pages=${configSections.dashboard} .pages=${configSections.dashboard}
></ha-config-navigation> ></ha-config-navigation>

View File

@ -13,6 +13,8 @@ import { HomeAssistant } from "../../../types";
class HaConfigNavigation extends LitElement { class HaConfigNavigation extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant; @property({ attribute: false }) public hass!: HomeAssistant;
@property({ type: Boolean }) public narrow!: boolean;
@property() public showAdvanced!: boolean; @property() public showAdvanced!: boolean;
@property() public pages!: PageNavigation[]; @property() public pages!: PageNavigation[];
@ -64,7 +66,7 @@ class HaConfigNavigation extends LitElement {
</div> </div>
`} `}
</paper-item-body> </paper-item-body>
<ha-icon-next></ha-icon-next> ${!this.narrow ? html`<ha-icon-next></ha-icon-next>` : ""}
</paper-icon-item> </paper-icon-item>
</a> </a>
` `