Update Pickers and selectors with required (#12151)

* Update Pickers and selectors with required

* Use native * for device and entity
This commit is contained in:
Zack Barett
2022-03-30 06:48:56 -05:00
committed by GitHub
parent f5af63a50e
commit 7ab54ee5ce
35 changed files with 159 additions and 50 deletions

View File

@@ -33,7 +33,7 @@ class HaLabeledSlider extends PolymerElement {
}
</style>
<div class="title">[[caption]]</div>
<div class="title">[[_getTitle()]]</div>
<div class="extra-container"><slot name="extra"></slot></div>
<div class="slider-container">
<ha-icon icon="[[icon]]" hidden$="[[!icon]]"></ha-icon>
@@ -49,10 +49,15 @@ class HaLabeledSlider extends PolymerElement {
`;
}
_getTitle() {
return `${this.caption}${this.required ? "*" : ""}`;
}
static get properties() {
return {
caption: String,
disabled: Boolean,
required: Boolean,
min: Number,
max: Number,
pin: Boolean,