Skip to content

Commit

Permalink
fix(avatar): add flexShrink 0 to avatar
Browse files Browse the repository at this point in the history
  • Loading branch information
shleewhite committed Oct 3, 2022
1 parent 2584262 commit a30a87d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changeset/gold-apples-own.md
@@ -0,0 +1,6 @@
---
'@twilio-paste/avatar': patch
'@twilio-paste/core': patch
---

[Avatar] add flexShrink 0 so it stays the correct size in a flex layout
Expand Up @@ -6,6 +6,9 @@ exports[`Avatar image should render responsive css with an image 1`] = `
box-sizing: border-box;
overflow: hidden;
text-align: center;
-webkit-flex-shrink: 0;
-ms-flex-negative: 0;
flex-shrink: 0;
width: sizeIcon30;
height: sizeIcon30;
background-color: colorBackgroundUser;
Expand Down Expand Up @@ -69,6 +72,9 @@ exports[`Avatar intials should render responsive css 1`] = `
box-sizing: border-box;
overflow: hidden;
text-align: center;
-webkit-flex-shrink: 0;
-ms-flex-negative: 0;
flex-shrink: 0;
width: sizeIcon10;
height: sizeIcon10;
background-color: colorBackgroundUser;
Expand Down
1 change: 1 addition & 0 deletions packages/paste-core/components/avatar/src/index.tsx
Expand Up @@ -90,6 +90,7 @@ const Avatar = React.forwardRef<HTMLDivElement, AvatarProps>(
element={element}
overflow="hidden"
textAlign="center"
flexShrink={0}
ref={ref}
size={size}
{...colorVariants[color]}
Expand Down

0 comments on commit a30a87d

Please sign in to comment.