mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
Img Sizes
This commit is contained in:
@@ -14,6 +14,7 @@ interface Props {
|
||||
imgWidth: number | string
|
||||
imgHeight: number | string
|
||||
priority?: boolean
|
||||
imgLayout?: 'fixed' | 'intrinsic' | 'responsive' | undefined
|
||||
}
|
||||
|
||||
const ProductCard: FC<Props> = ({
|
||||
@@ -22,6 +23,7 @@ const ProductCard: FC<Props> = ({
|
||||
variant,
|
||||
imgWidth,
|
||||
imgHeight,
|
||||
imgLayout = 'responsive',
|
||||
priority,
|
||||
}) => {
|
||||
const src = p.images.edges?.[0]?.node?.urlOriginal!
|
||||
@@ -50,6 +52,7 @@ const ProductCard: FC<Props> = ({
|
||||
height={imgHeight}
|
||||
priority={priority}
|
||||
quality="85"
|
||||
layout={imgLayout}
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
|
@@ -8,7 +8,7 @@
|
||||
|
||||
& > * {
|
||||
@apply flex-1 px-16 py-4;
|
||||
width: 450px;
|
||||
width: 430px;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user