Breaking Changes
- Consistent naming scheme implemented both internally and externally. External breaking change to the
onImageSelected
prop which has been renamedonSelectImage
. All internal instances ofFunc
refactored toFn
.handleClickImage
refactored toonClickImage
.handleResize
refactored toonResize
.
The following changes in v0.2.7 allow react-grid-gallery to be used in an (optionally) stateless way.
- Added optional prop
onClickImage
. This prop takes a function and is triggered when a lightbox displayed image is clicked. Supplying this prop will override the defaultonClickImage
function. - Added optional prop
onClickPrev
. This prop takes a function and is triggered when the left arrow in lightbox is clicked. Supplying this prop will override the defaultonClickPrev
function. - Added optional prop
onClickNext
. This prop takes a function and is triggered when the right arrow in lightbox is clicked. Supplying this prop will override the defaultonClickNext
function. - Added explicit
closeLightbox
function to the lightboxonClose
prop.