Skip to content
This repository has been archived by the owner on Aug 1, 2022. It is now read-only.

Commit

Permalink
fix: properly scale avatar images
Browse files Browse the repository at this point in the history
We remove the `image` class that fixed the size. Instead the size is
determined by the `size` class, just like for the avatar fallback.

Signed-off-by: Thomas Scholtes <geigerzaehler@axiom.fm>
  • Loading branch information
geigerzaehler committed Aug 9, 2021
1 parent 0a54a05 commit 30f3bdc
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions ui/DesignSystem/Avatar.svelte
Expand Up @@ -120,12 +120,6 @@
flex-shrink: 0;
}
.image {
width: 32px;
height: 32px;
border-radius: 16px;
}
.pulsate {
opacity: 1;
animation: pulsate 3.5s ease-out infinite;
Expand All @@ -144,7 +138,7 @@

<div data-cy={dataCy} class={`container ${size}`} {style}>
{#if imageUrl}
<img class={`image ${avatarClass}`} src={imageUrl} alt="user-avatar" />
<img class={`avatar ${avatarClass}`} src={imageUrl} alt="user-avatar" />
{:else if avatarFallback}
<div
class={`avatar ${avatarClass}`}
Expand Down

0 comments on commit 30f3bdc

Please sign in to comment.