Skip to content

Commit

Permalink
Merge pull request #242 from matt8707/icon
Browse files Browse the repository at this point in the history
Fix issue where certain icons didn't display properly
  • Loading branch information
matt8707 authored Jan 22, 2024
2 parents 245ae7a + 6f1fe90 commit c8bf8dc
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/lib/Main/Button.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -390,12 +390,16 @@
class="icon"
data-state={stateOn}
style:--icon-color={iconColor}
style:background-image={image ? `url(${icon})` : 'none'}
style:background-image={!icon && attributes?.entity_picture
? `url(${attributes?.entity_picture})`
: 'none' || image
? `url(${icon})`
: 'none'}
class:image
>
{#if loading}
<img src="loader.svg" alt="loading" style="margin:0 auto" />
{:else if image}
{:else if image || (!icon && attributes?.entity_picture)}
&nbsp;
{:else if icon}
<Icon {icon} height="auto" width="100%" />
Expand Down Expand Up @@ -476,6 +480,11 @@
border-radius: 50%;
display: grid;
align-items: center;
display: flex;
padding: 0.5rem;
background-position: center center;
background-size: cover;
background-repeat: no-repeat;
}
.name {
Expand Down

0 comments on commit c8bf8dc

Please sign in to comment.