From 5227541f72777b284a1a785ad5fb3eb24553772e Mon Sep 17 00:00:00 2001 From: schelv <13403863+schelv@users.noreply.github.com> Date: Sat, 20 Jul 2024 12:35:00 +0200 Subject: [PATCH] improve label appearance --- src/components/ha-base-time-input.ts | 239 ++++++++++++++------------- 1 file changed, 122 insertions(+), 117 deletions(-) diff --git a/src/components/ha-base-time-input.ts b/src/components/ha-base-time-input.ts index 6a80b2f4f0f2..7c9e75035229 100644 --- a/src/components/ha-base-time-input.ts +++ b/src/components/ha-base-time-input.ts @@ -133,138 +133,140 @@ export class HaBaseTimeInput extends LitElement { ${this.label ? html`` : ""} -
- ${this.enableDay - ? html` - +
+ ${this.enableDay + ? html` + + + ` + : ""} + + + + + + ${this.enableSecond + ? html` - - ` - : ""} - - - - - - ${this.enableSecond - ? html` - ` - : ""} - ${this.enableMillisecond - ? html`` + : ""} + ${this.enableMillisecond + ? html` + ` + : ""} + ${this.clearable && !this.required && !this.disabled + ? html`` + : nothing} +
+ + ${this.format === 24 + ? "" + : html` -
` + AM + PM + `} + ${this.helper + ? html`${this.helper}` : ""} - ${this.clearable && !this.required && !this.disabled - ? html`` - : nothing}
- - ${this.format === 24 - ? "" - : html` - AM - PM - `} - ${this.helper - ? html`${this.helper}` - : ""} `; } @@ -322,6 +324,9 @@ export class HaBaseTimeInput extends LitElement { position: relative; } :host { + display: block; + } + .time-input-wrap-wrap { display: flex; } .time-input-wrap {