Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add height and width 100% of the smallImage and also add objectFit fill in it . #166

Open
faiqfarooq opened this issue Aug 18, 2023 · 0 comments

Comments

@faiqfarooq
Copy link

<ReactImageMagnify
{...{
smallImage: {
alt: "Wristwatch by Ted Baker London",
isFluidWidth: true,
//////////////////////////////////////////////////////////////////////////////////////////////
its not working
imageStyle: {
objectFit: "fill", // Add this line for "fill" behavior
width: "100%",
height: "100%",
},
////////////////////////////////////////////////////////////////////////////////////////////
src: data.imgSrc, // Corrected syntax here
sizes:
"(max-width: 480px) 100vw, (max-width: 1200px) 30vw,(max-width: 1600px) 30vw, 400px",
},
largeImage: {
alt: "",
src: data.imgSrc, // Corrected syntax here
width: 1000,
height: 1500,
},
enlargedImagePosition: "over",
}}

              />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant