Fix flow form padding end (#25328)

* Fix flow form padding end

* Use more end padding if docs are present
This commit is contained in:
Wendelin
2025-05-06 13:52:00 +02:00
committed by GitHub
parent 852278e8aa
commit 00d708fbd4
8 changed files with 61 additions and 23 deletions

View File

@@ -22,6 +22,9 @@ class StepFlowAbort extends LitElement {
@property({ attribute: false }) public handler!: string;
@property({ type: Boolean, attribute: "increase-padding-end" })
public increasePaddingEnd = false;
protected firstUpdated(changed: PropertyValues) {
super.firstUpdated(changed);
if (this.step.reason === "missing_credentials") {
@@ -34,7 +37,7 @@ class StepFlowAbort extends LitElement {
return nothing;
}
return html`
<h2>
<h2 class=${this.increasePaddingEnd ? "end-space" : ""}>
${this.params.flowConfig.renderAbortHeader
? this.params.flowConfig.renderAbortHeader(this.hass, this.step)
: this.hass.localize(`component.${this.domain}.title`)}