I have code below to display images in Image.Group
with size prop to be set to "small". In side the Image.Group
, I used ModalImage
which is imported from react-modal-image
. It is supposed to display large size photo when the image is clicked. But the fact is that when the image is clicked, it still shows the same size image as before. I know the problem is from size="small"
, and ModalImage simply inherits the prop from Image.Group. In this case, how can I overwrite the size to large in case the image is clicked?
<Image.Group size="small">
{photos &&
photos.map(photo => (
<LazyLoad key={photo.name} height={150}>
<ModalImage
small={photo.url}
large={photo.url}
alt={photo.name}
hideDownload={true}
hideZoom={true}
/>;
</LazyLoad>
))}
</Image.Group>