Img Sizes

This commit is contained in:
Belen Curcio 2020-11-05 18:59:22 -03:00
parent 3b5ac2df1f
commit c419c3f361
4 changed files with 7 additions and 2 deletions

View File

@ -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>
) : (

View File

@ -8,7 +8,7 @@
& > * {
@apply flex-1 px-16 py-4;
width: 450px;
width: 430px;
}
}

View File

@ -1,6 +1,6 @@
module.exports = {
images: {
sizes: [320, 480, 820, 1200, 1600],
imagesSizes: [320, 480, 820, 1200, 1600],
domains: ['cdn11.bigcommerce.com'],
},
i18n: {

View File

@ -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>