react-photo-album
Advanced tools
Comparing version 3.0.1 to 3.0.2
@@ -46,3 +46,3 @@ import { jsx, jsxs } from "react/jsx-runtime"; | ||
}, ref) { | ||
const { src, alt, title, href } = photo; | ||
const { href } = photo; | ||
const context = { photo, index, width: round(width, 3), height: round(height, 3) }; | ||
@@ -64,3 +64,3 @@ let props; | ||
children: [ | ||
jsx(Component$1, { as: "img", classes: "image", render: image, ...{ src, alt, title, context, ...imageProps } }), | ||
jsx(Component$1, { as: "img", classes: "image", render: image, context, ...imageProps }), | ||
extras?.({}, context) | ||
@@ -114,2 +114,3 @@ ] | ||
const { photo, index, width } = context; | ||
const { key, src, alt, title, label } = photo; | ||
const onClick = onClickCallback ? (event) => { | ||
@@ -123,3 +124,3 @@ onClickCallback({ event, photo, index }); | ||
const ariaLabel = (props) => { | ||
return photo.label ? { "aria-label": photo.label, ...props } : props; | ||
return label ? { "aria-label": label, ...props } : props; | ||
}; | ||
@@ -135,2 +136,5 @@ return jsx( | ||
decoding: "async", | ||
src, | ||
alt, | ||
title, | ||
...srcSetAndSizes(photo, sizes, width, containerWidth, photosCount, spacing, padding), | ||
@@ -145,3 +149,3 @@ ...unwrap(imageProps, context) | ||
}, | ||
photo.key ?? photo.src | ||
key ?? src | ||
); | ||
@@ -148,0 +152,0 @@ }) |
{ | ||
"name": "react-photo-album", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "Responsive photo gallery component for React", | ||
@@ -5,0 +5,0 @@ "author": "Igor Danchenko", |
80676
1572