Skip to content

Commit

Permalink
Add input field to ha form integer when it has a min and max (#6781)
Browse files Browse the repository at this point in the history
  • Loading branch information
bramkragten committed Sep 3, 2020
1 parent fd6436d commit be8812e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/ha-form/ha-form-integer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ export class HaFormInteger extends LitElement implements HaFormElement {
`
: ""}
<ha-paper-slider
pin=""
pin
editable
.value=${this._value}
.min=${this.schema.valueMin}
.max=${this.schema.valueMax}
Expand Down Expand Up @@ -111,6 +112,10 @@ export class HaFormInteger extends LitElement implements HaFormElement {
.flex {
display: flex;
}
ha-paper-slider {
width: 100%;
margin-right: 16px;
}
`;
}
}
Expand Down
4 changes: 4 additions & 0 deletions src/components/ha-paper-slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ class HaPaperSlider extends PaperSliderClass {
-webkit-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);
return tpl;
Expand Down

0 comments on commit be8812e

Please sign in to comment.