AdamRisberg / react-image-magnifiers

A collection of responsive, image magnifying React components for mouse and touch.
MIT License
347 stars 60 forks source link

Custom white box (representing the zoom area) #17

Closed arso1er closed 4 years ago

arso1er commented 4 years ago

Hi, I'd like to know if I can customize the white box (representing the zoom area) within the small preview image. Thanks.

AdamRisberg commented 4 years ago

Right now the only customization available is changing the opacity of that box. However, I can probably add in some more options in the next update. What were you looking to customize on it?

arso1er commented 4 years ago

I wanted something like amazon: a div with a background image instead of the white box.

AdamRisberg commented 4 years ago

Yeah, I should be able to add that feature into the next update. Should be done within the next day or two. I've got a couple of other things I want to include.

arso1er commented 4 years ago

OK. Thanks. If you could look at my previous issue too, It would be great.

AdamRisberg commented 4 years ago

It wouldn't feel right to only notify you on one issue. :) So, I just published the update to NPM (version 1.3.0). You can now give the preview box a background image on all applicable components. The overlay color and box border color can also be changed now. So, if you only want to use a background image, you can set the overlayOpacity to zero and set the overlayBoxColor to transparent.

arso1er commented 4 years ago

After update, I got exactly what I wanted.

Thanks again.