yifaneye / react-gallery-carousel

Carousel component 🎠🎠🎠 supporting touch, mouse, keyboard, thumbnails, fullscreen, lazy loading, SSR and customisations. 👉 Live editor: https://yifanai.com/rgcd1
https://yifanai.com/rgc
MIT License
215 stars 30 forks source link

feat: Add onMaximizedStatusChange prop fn #93

Open sashko9807 opened 9 months ago

sashko9807 commented 9 months ago

Whenever a state of isMaximized is changed, be it via ESC key or ExpandButton, send back the new status of isMaximized, in order to allow a customized behavior.

In some edge-cases one might want to render the Gallery Carousel conditionally, for example: I already have a grid to display images at smaller width, but I want to render the maximized carousel, whenever user clicks on one of the images, and close it whenever user presses ESC, or ExpandButton.