Small tweaks for the create automation from blueprint screen (#9980)

This commit is contained in:
Paulus Schoutsen 2021-09-07 00:40:25 -07:00 committed by GitHub
parent 6ba6b821f5
commit d55bade070
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,7 +53,8 @@ export class HaBlueprintAutomationEditor extends LitElement {
protected render() { protected render() {
const blueprint = this._blueprint; const blueprint = this._blueprint;
return html`<ha-config-section vertical .isWide=${this.isWide}> return html`
<ha-config-section vertical .isWide=${this.isWide}>
${!this.narrow ${!this.narrow
? html` <span slot="header">${this.config.alias}</span> ` ? html` <span slot="header">${this.config.alias}</span> `
: ""} : ""}
@ -118,13 +119,12 @@ export class HaBlueprintAutomationEditor extends LitElement {
</ha-card> </ha-card>
</ha-config-section> </ha-config-section>
<ha-config-section vertical .isWide=${this.isWide}> <ha-card
<span slot="header" class="blueprint"
>${this.hass.localize( .header=${this.hass.localize(
"ui.panel.config.automation.editor.blueprint.header" "ui.panel.config.automation.editor.blueprint.header"
)}</span )}
> >
<ha-card>
<div class="blueprint-picker-container"> <div class="blueprint-picker-container">
${this._blueprints ${this._blueprints
? Object.keys(this._blueprints).length ? Object.keys(this._blueprints).length
@ -192,7 +192,7 @@ export class HaBlueprintAutomationEditor extends LitElement {
</p>`}` </p>`}`
: ""} : ""}
</ha-card> </ha-card>
</ha-config-section>`; `;
} }
private async _getBlueprints() { private async _getBlueprints() {
@ -267,11 +267,15 @@ export class HaBlueprintAutomationEditor extends LitElement {
return [ return [
haStyle, haStyle,
css` css`
ha-card.blueprint {
max-width: 1040px;
margin: 24px auto;
}
.padding { .padding {
padding: 16px; padding: 16px;
} }
.blueprint-picker-container { .blueprint-picker-container {
padding: 16px; padding: 0 16px 16px;
} }
h3 { h3 {
margin: 16px; margin: 16px;