We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, first of all thanks for this great lib 🤗
So it's not explained in the docs that the closeOnBackdropClick needs the viewer's container and viewer's image to have some classes.
closeOnBackdropClick
Without this knowledge, when using a custom View component, the closeOnBackdropClick doesn't work.
View
It would be great to explain this on the docs and provide those classes in the innerProps or so
innerProps
The text was updated successfully, but these errors were encountered:
Hi Tom do you mind saying what classes are needed? Thanks
Sorry, something went wrong.
I believe you have to add the following class on your View's root element : react-images__view
react-images__view
This does not work with the following:
import React from 'react'; import Img from 'gatsby-image'; import Carousel, { ModalGateway, Modal } from 'react-images'; const GalleryImage = props => { return ( <Img className="react-images__view" imgStyle={{ objectFit: 'contain' }} fluid={props.data} alt={props.data.caption} /> ); }; const MyComponent = props => { // ... return ( <ModalGateway> {modalIsOpen && ( <Modal onClose={() => setModalIsOpen(false)}> <Carousel views={images} components={{ View: GalleryImage }} /> </Modal> )} </ModalGateway> ); };
No branches or pull requests
Hi, first of all thanks for this great lib 🤗
So it's not explained in the docs that the
closeOnBackdropClick
needs the viewer's container and viewer's image to have some classes.Without this knowledge, when using a custom
View
component, thecloseOnBackdropClick
doesn't work.It would be great to explain this on the docs and provide those classes in the
innerProps
or soThe text was updated successfully, but these errors were encountered: