Add icon to add-on picker (#12174)

This commit is contained in:
Joakim Sørensen
2022-03-31 15:16:19 +02:00
committed by GitHub
parent bf35ee549d
commit edc15940a2
3 changed files with 5 additions and 2 deletions

View File

@@ -13,9 +13,12 @@ import { HaComboBox } from "./ha-combo-box";
const rowRenderer: ComboBoxLitRenderer<HassioAddonInfo> = (
item
) => html`<mwc-list-item twoline>
) => html`<mwc-list-item twoline graphic="icon">
<span>${item.name}</span>
<span slot="secondary">${item.slug}</span>
${item.icon
? html`<img slot="graphic" .src="/api/hassio/addons/${item.slug}/icon" />`
: ""}
</mwc-list-item>`;
@customElement("ha-addon-picker")