Fix formfield display (#6245)

This commit is contained in:
Paulus Schoutsen 2020-06-26 12:17:27 -07:00 committed by GitHub
parent 7395d19489
commit 2cd367f29f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 76 additions and 62 deletions

View File

@ -143,15 +143,17 @@ class CloudGoogleAssistant extends LitElement {
</ha-formfield>
${entity.might_2fa
? html`
<ha-formfield
.label=${this.hass!.localize(
"ui.panel.config.cloud.google.disable_2FA"
)}
>
<ha-switch
.entityId=${entity.entity_id}
.checked=${Boolean(config.disable_2fa)}
@change=${this._disable2FAChanged}
>
${this.hass!.localize(
"ui.panel.config.cloud.google.disable_2FA"
)}
</ha-switch>
></ha-switch>
</ha-formfield>
`
: ""}
</div>
@ -375,6 +377,9 @@ class CloudGoogleAssistant extends LitElement {
state-info {
cursor: pointer;
}
ha-formfield {
display: block;
}
ha-switch {
padding: 8px 0;
}

View File

@ -232,6 +232,9 @@ class DialogMQTTDeviceDebugInfo extends LitElement {
.triggerlistitem {
margin-bottom: 12px;
}
ha-formfield {
display: block;
}
`,
];
}

View File

@ -318,6 +318,9 @@ export class DialogLovelaceDashboardDetail extends LitElement {
ha-switch {
padding: 16px 0;
}
ha-formfield {
display: block;
}
`,
];
}

View File

@ -136,33 +136,35 @@ export class HuiButtonCardEditor extends LitElement
"ui.panel.lovelace.editor.card.config.optional"
)})"
.value=${this._icon}
.placeholder=${
this._icon || stateIcon(this.hass.states[this._entity])
}
.placeholder=${this._icon ||
stateIcon(this.hass.states[this._entity])}
.configValue=${"icon"}
@value-changed=${this._valueChanged}
></ha-icon-input>
</div>
<div class="side-by-side">
<ha-formfield .label=${this.hass.localize(
<ha-formfield
.label=${this.hass.localize(
"ui.panel.lovelace.editor.card.generic.show_name"
)}>
)}
>
<ha-switch
.checked="${this._config!.show_name !== false}"
.configValue="${"show_name"}"
@change="${this._valueChanged}"
></ha-switch
>
></ha-switch>
</ha-formfield>
<ha-formfield .label=${this.hass.localize(
<ha-formfield
.label=${this.hass.localize(
"ui.panel.lovelace.editor.card.generic.show_icon"
)}>
)}
>
<ha-switch
.checked="${this._config!.show_icon !== false}"
.configValue="${"show_icon"}"
@change="${this._valueChanged}"
></ha-switch
></ha-formfield>
></ha-switch>
</ha-formfield>
</div>
<div class="side-by-side">
<paper-input
@ -183,8 +185,6 @@ export class HuiButtonCardEditor extends LitElement
.configValue="${"theme"}"
@value-changed="${this._valueChanged}"
></hui-theme-select-editor>
</paper-input>
</div>
<div class="side-by-side">
<hui-action-editor

View File

@ -133,11 +133,11 @@ export class HuiViewEditor extends LitElement {
@change=${this._valueChanged}
></ha-switch
></ha-formfield>
<span class="panel"
>${this.hass.localize(
<span class="panel">
${this.hass.localize(
"ui.panel.lovelace.editor.view.panel_mode.description"
)}</span
>
)}
</span>
</div>
`;
}
@ -181,6 +181,9 @@ export class HuiViewEditor extends LitElement {
.panel {
color: var(--secondary-text-color);
}
ha-formfield {
display: block;
}
`;
}
}