Skip to content

Commit

Permalink
fix: added min height/width and object fit cover to avatar (#1058)
Browse files Browse the repository at this point in the history
  • Loading branch information
kirkas committed Aug 15, 2024
1 parent c55a9c1 commit 701c176
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .changeset/afraid-tips-whisper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@coinbase/onchainkit": minor
---
**fix**: Modify `Avatar` component to handle images with varying height/width ratio. By @kirkas #1058
2 changes: 1 addition & 1 deletion src/identity/components/Avatar.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const WithBadge: Story = {

export const Base: Story = {
args: {
address: '0xFd3d8ffE248173B710b4e24a7E75ac4424853503',
address: '0x8c8F1a1e1bFdb15E7ed562efc84e5A588E68aD73',
chain: base,
},
};
Expand Down
1 change: 1 addition & 0 deletions src/identity/components/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export function Avatar({
{/* biome-ignore lint: alt gets assigned */}
{displayAvatarImg ? (
<img
className="min-h-full min-w-full object-cover"
data-testid="ockAvatar_Image"
loading="lazy"
width="100%"
Expand Down

0 comments on commit 701c176

Please sign in to comment.