Skip to content

Commit

Permalink
Add max height to skeleton image
Browse files Browse the repository at this point in the history
  • Loading branch information
teodorus-nathaniel committed Jul 11, 2024
1 parent fe7fd9f commit 0c2e228
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/MediaLoader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ export default function MediaLoader({
<Image
{...commonProps}
loading='eager'
className={cx('max-h-96 object-contain', commonProps.className)}
className={cx(
'mx-auto max-h-96 object-contain',
commonProps.className
)}
style={{ backfaceVisibility: 'hidden', ...commonProps.style }}
width={commonProps.width || 500}
height={commonProps.height || 500}
Expand All @@ -123,7 +126,7 @@ export default function MediaLoader({
) : (
<div
className={cx(
'aspect-square w-full animate-pulse bg-background-lighter',
'aspect-square max-h-96 w-full animate-pulse bg-background-lighter',
placeholderClassName
)}
/>
Expand Down

0 comments on commit 0c2e228

Please sign in to comment.