Fix boolean attributes (#23189)

This commit is contained in:
Paul Bottein
2024-12-06 18:39:34 +01:00
committed by GitHub
parent ea5bf17780
commit 6934f0626c
157 changed files with 275 additions and 234 deletions

View File

@@ -103,7 +103,8 @@ export class HaEntityPicker extends LitElement {
@property({ attribute: false })
public entityFilter?: HaEntityPickerEntityFilterFunc;
@property({ attribute: false, type: Boolean }) public hideClearIcon = false;
@property({ attribute: "hide-clear-icon", type: Boolean })
public hideClearIcon = false;
@property({ attribute: "item-label-path" }) public itemLabelPath =
"friendly_name";

View File

@@ -55,7 +55,7 @@ export class HaStateLabelBadge extends LitElement {
@property() public image?: string;
@property({ attribute: false, type: Boolean }) public showName = false;
@property({ attribute: "show-name", type: Boolean }) public showName = false;
@state() private _timerTimeRemaining?: number;

View File

@@ -14,7 +14,7 @@ class StateInfo extends LitElement {
@property({ attribute: false }) public stateObj?: HassEntity;
@property({ attribute: false, type: Boolean }) public inDialog = false;
@property({ attribute: "in-dialog", type: Boolean }) public inDialog = false;
@property() public color?: string;
@@ -32,7 +32,7 @@ class StateInfo extends LitElement {
.color=${this.color}
></state-badge>
<div class="info">
<div class="name" .title=${name} .inDialog=${this.inDialog}>
<div class="name ${this.inDialog ? "in-dialog" : ""}" .title=${name}>
${name}
</div>
${this.inDialog
@@ -108,7 +108,7 @@ class StateInfo extends LitElement {
text-overflow: ellipsis;
}
.name[inDialog],
.name.in-dialog,
:host([secondary-line]) .name {
line-height: 20px;
}