react-component/image

How to modify preview events

Opened this issue · 0 comments

Following custom preview image demo:

<Image
      width={200}
      src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png?x-oss-process=image/blur,r_50,s_50/quality,q_1/resize,m_mfit,h_200,w_200"
      preview={{
        src: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png',
      }}
/>

The only way to close the popup image is either: a) X button b) press on the modal (outside the image).

How is it possible to close the popup when clicking the image?

Using Image preview API modifies only the hover modal of the preview, and modal property of preview does the same.