react-photoswipe-gallery
react-photoswipe-gallery copied to clipboard
Pass `className` of `Gallery` into the `Protal`
Is your feature request related to a problem? Please describe.
I want to use the styled component library to style the Gallery
but seem it's not working due to className
of Gallery is not passed to the Portal
Describe the solution you'd like
I would like the Gallery
to accept className
as props and pass to the created Portal
Describe alternatives you've considered I can style the component using global CSS.
Hi! The Gallery
component doesn't render any DOM elements. It's just a context provider.
Photoswipe right before init appends its own elements to the body
(by default). It can be controlled with appendToEl option, which you can pass using <Gallery options={{ appendToEl: yourElementRef.current }} />
prop.
OK. I think that will work. But would be best if className
is passed to slideContent .element
by default at here.