New version (V4)
Improvements
- Add video support, now the gallery supports 2 types of media - image and video, the video element contains all the options that the image has.
- Lightbox support in the video element.
- Add a callback function called
onClick
when clicking on a media element. - Change library variables names and functions to be aligned with both image and video.
- Update all package dependencies to their latest version.
- Fix some bugs related to media style/className props.
- Other improvements and bug fixes.
Breaking change
Gallery options:
- Rename
images
prop tomedia
. - Rename
numOfImagesPerRow
prop tonumOfMediaPerRow
. - Rename
imageMaxWidth
prop tomediaMaxWidth
. - Rename
imagesPaddingBottom
prop tomediaPaddingBottom
. - Rename
imagesStyle
prop tomediaStyle
. - Rename
selectableItems
prop toselectableMedia
. - Rename
mediaPaddingBottom
tomediaMarginBottom
Media(Image previously) options:
- Add
type
prop - could beimage
orvideo
where the default isimage
. - Add
mediaStyle
prop to support style object for specific media element . - Add
videoType
prop to support style object for specific media element . - Add
additionalVideoProps
prop to get more video properties. . - Rename
imgClassName
prop tomediaClassName
.