mirror of
https://github.com/vercel/commerce.git
synced 2025-03-14 22:42:33 +00:00
Img Sizes
This commit is contained in:
parent
3b5ac2df1f
commit
c419c3f361
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
module.exports = {
|
||||
images: {
|
||||
sizes: [320, 480, 820, 1200, 1600],
|
||||
imagesSizes: [320, 480, 820, 1200, 1600],
|
||||
domains: ['cdn11.bigcommerce.com'],
|
||||
},
|
||||
i18n: {
|
||||
|
@ -97,6 +97,7 @@ export default function Home({
|
||||
variant="slim"
|
||||
imgWidth={320}
|
||||
imgHeight={320}
|
||||
imgLayout="fixed"
|
||||
/>
|
||||
))}
|
||||
</Marquee>
|
||||
@ -129,6 +130,7 @@ export default function Home({
|
||||
variant="slim"
|
||||
imgWidth={320}
|
||||
imgHeight={320}
|
||||
imgLayout="fixed"
|
||||
/>
|
||||
))}
|
||||
</Marquee>
|
||||
|
Loading…
x
Reference in New Issue
Block a user