Skip to content

Commit c3cff3b

Browse files
authored
Fix add to list item (#28073)
* Fix add to list item * Remove unused css
1 parent e65a8a6 commit c3cff3b

File tree

1 file changed

+8
-18
lines changed

1 file changed

+8
-18
lines changed

src/dialogs/more-info/ha-more-info-add-to.ts

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ import { LitElement, css, html, nothing } from "lit";
22
import { customElement, property, state } from "lit/decorators";
33
import "../../components/ha-alert";
44
import "../../components/ha-icon";
5-
import "../../components/ha-list-item";
5+
import "../../components/ha-md-list-item";
66
import "../../components/ha-spinner";
77
import type {
8-
ExternalEntityAddToActions,
98
ExternalEntityAddToAction,
9+
ExternalEntityAddToActions,
1010
} from "../../external_app/external_messaging";
1111
import { showToast } from "../../util/toast";
1212

13-
import type { HomeAssistant } from "../../types";
1413
import { fireEvent } from "../../common/dom/fire_event";
14+
import type { HomeAssistant } from "../../types";
1515

1616
@customElement("ha-more-info-add-to")
1717
export class HaMoreInfoAddTo extends LitElement {
@@ -93,19 +93,18 @@ export class HaMoreInfoAddTo extends LitElement {
9393
<div class="actions-list">
9494
${this._externalActions.actions.map(
9595
(action) => html`
96-
<ha-list-item
97-
graphic="icon"
96+
<ha-md-list-item
97+
type="button"
9898
.disabled=${!action.enabled}
9999
.action=${action}
100-
.twoline=${!!action.details}
101100
@click=${this._actionSelected}
102101
>
102+
<ha-icon slot="start" .icon=${action.mdi_icon}></ha-icon>
103103
<span>${action.name}</span>
104104
${action.details
105-
? html`<span slot="secondary">${action.details}</span>`
105+
? html`<span slot="supporting-text">${action.details}</span>`
106106
: nothing}
107-
<ha-icon slot="graphic" .icon=${action.mdi_icon}></ha-icon>
108-
</ha-list-item>
107+
</ha-md-list-item>
109108
`
110109
)}
111110
</div>
@@ -131,15 +130,6 @@ export class HaMoreInfoAddTo extends LitElement {
131130
flex-direction: column;
132131
}
133132
134-
ha-list-item {
135-
cursor: pointer;
136-
}
137-
138-
ha-list-item[disabled] {
139-
cursor: not-allowed;
140-
opacity: 0.5;
141-
}
142-
143133
ha-icon {
144134
display: flex;
145135
align-items: center;

0 commit comments

Comments
 (0)