mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 03:06:41 +00:00
Fix alignment of ha-labeled-slider (#25279)
This commit is contained in:
parent
358e450e60
commit
678a8a85cb
@ -30,8 +30,9 @@ class HaLabeledSlider extends LitElement {
|
|||||||
@property({ type: Number }) public value?: number;
|
@property({ type: Number }) public value?: number;
|
||||||
|
|
||||||
protected render() {
|
protected render() {
|
||||||
|
const title = this._getTitle();
|
||||||
return html`
|
return html`
|
||||||
<div class="title">${this._getTitle()}</div>
|
${title ? html`<div class="title">${title}</div>` : nothing}
|
||||||
<div class="extra-container"><slot name="extra"></slot></div>
|
<div class="extra-container"><slot name="extra"></slot></div>
|
||||||
<div class="slider-container">
|
<div class="slider-container">
|
||||||
${this.icon ? html`<ha-icon icon=${this.icon}></ha-icon>` : nothing}
|
${this.icon ? html`<ha-icon icon=${this.icon}></ha-icon>` : nothing}
|
||||||
@ -73,17 +74,20 @@ class HaLabeledSlider extends LitElement {
|
|||||||
|
|
||||||
.slider-container {
|
.slider-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
ha-icon {
|
ha-icon {
|
||||||
margin-top: 8px;
|
|
||||||
color: var(--secondary-text-color);
|
color: var(--secondary-text-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
ha-slider {
|
ha-slider {
|
||||||
|
display: flex;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
|
align-items: center;
|
||||||
background-image: var(--ha-slider-background);
|
background-image: var(--ha-slider-background);
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
height: 32px;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user