Skip to content

Commit

Permalink
Add image option for actions
Browse files Browse the repository at this point in the history
  • Loading branch information
DBuit committed Apr 22, 2021
1 parent 47f4b18 commit 74c4907
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/light-popup-card.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/light-popup-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class LightPopupCard extends LitElement {
actionCount++;
return html`
<div class="action" style="--size:${actionSize};" @click="${e => this._activateAction(e)}" data-service="${actionRowCount}#${actionCount}">
<span class="color" style="background-color: ${action.color};border-color: ${action.color};--size:${actionSize};">${action.icon ? html`<ha-icon icon="${action.icon}" />`:html``}</span>
<span class="color" style="background-color: ${action.color};border-color: ${action.color};--size:${actionSize};${action.image ? "background-size: contain;background-image:url('"+action.image+"')" : ""}">${action.icon ? html`<ha-icon icon="${action.icon}" />`:html``}</span>
${action.name ? html`<span class="name">${action.name}</span>`: html``}
</div>
`
Expand Down

0 comments on commit 74c4907

Please sign in to comment.