Skip to content

Commit

Permalink
fix: refactor onVisibleChange function in usePreview.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin3go committed Dec 23, 2023
1 parent 6f0f123 commit 3cfccbe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Image/usePreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ export const usePreview = ({
imageRender: (node) => <Preview visible={visible}>{node}</Preview>,
maxScale,
minScale,
onVisibleChange: (e) => {
setVisible(e);
onVisibleChange?.(e);
onVisibleChange: (visible: boolean, prevVisible: boolean, current: number) => {
setVisible(visible);
onVisibleChange?.(visible, prevVisible, current);
},

styles: { mask: { backdropFilter: 'blur(2px)' }, ...previewStyle },
Expand Down

0 comments on commit 3cfccbe

Please sign in to comment.