Skip to content

Commit fd98d8c

Browse files
committed
🐛 Fix distorted avatar images when aspect ratio is not 1:1
1 parent 36c9387 commit fd98d8c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/components/Alert/Alert.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ const Alert = ({
3838
return (
3939
<Element className={classes} {...rest}>
4040
{icon && icon}
41-
{!icon && theme && <div dangerouslySetInnerHTML={{ __html: iconMap[theme] }} />}
41+
{!icon && theme && <div
42+
dangerouslySetInnerHTML={{ __html: iconMap[theme] }}
43+
style={{ height: '20px' }}
44+
/>}
4245

4346
<ConditionalWrapper condition={!!(icon || theme)} wrapper={children => (
4447
<div className={styles.wrapper}>

src/components/Avatar/avatar.module.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ body {
77
.avatar {
88
@include border-radius(max);
99

10+
object-fit: cover;
11+
1012
&:not(.borderless) {
1113
border: 3px solid var(--w-avatar-border);
1214
}

0 commit comments

Comments
 (0)