Skip to content

Commit

Permalink
fix: Fix image aspect ratio in app icon component (#435)
Browse files Browse the repository at this point in the history
  • Loading branch information
maciaszczykm authored Mar 16, 2023
1 parent 743bd8a commit cfdbc04
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Binary file added public/photo2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/components/AppIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ ref: Ref<any>) {
alt={alt}
width={iconSize}
height={iconSize}
objectFit="cover"
{...props}
/>
) : icon || (
Expand Down
8 changes: 6 additions & 2 deletions src/stories/AppIcon.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,18 @@ function Template({ onFillLevel, ...args }: any) {
url={args.icon}
{...args}
/>

<AppIcon
size={size}
url="photo.png"
spacing="none"
{...args}
/>

<AppIcon
size={size}
url="photo2.jpg"
spacing="none"
{...args}
/>
<AppIcon
size={size}
name={args.name || undefined}
Expand Down

0 comments on commit cfdbc04

Please sign in to comment.