Add input field to ha form integer when it has a min and max (#6781)

This commit is contained in:
Bram Kragten 2020-09-03 23:23:10 +02:00 committed by GitHub
parent fd6436d490
commit be8812e0af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -54,7 +54,8 @@ export class HaFormInteger extends LitElement implements HaFormElement {
` `
: ""} : ""}
<ha-paper-slider <ha-paper-slider
pin="" pin
editable
.value=${this._value} .value=${this._value}
.min=${this.schema.valueMin} .min=${this.schema.valueMin}
.max=${this.schema.valueMax} .max=${this.schema.valueMax}
@ -111,6 +112,10 @@ export class HaFormInteger extends LitElement implements HaFormElement {
.flex { .flex {
display: flex; display: flex;
} }
ha-paper-slider {
width: 100%;
margin-right: 16px;
}
`; `;
} }
} }

View File

@ -68,6 +68,10 @@ class HaPaperSlider extends PaperSliderClass {
-webkit-transform: scale(1) translate(0, -17px) scaleX(-1) !important; -webkit-transform: scale(1) translate(0, -17px) scaleX(-1) !important;
transform: scale(1) translate(0, -17px) scaleX(-1) !important; transform: scale(1) translate(0, -17px) scaleX(-1) !important;
} }
.slider-input {
width: 54px;
}
`; `;
tpl.content.appendChild(styleEl); tpl.content.appendChild(styleEl);
return tpl; return tpl;