otter-react-photo-view
Version:
An exquisite React photo preview component
7 lines (6 loc) • 361 B
TypeScript
import type { ActiveAnimationType } from '../types';
/**
* 动画关闭处理真实关闭状态
* 通过 onAnimationEnd 回调实现 leaveCallback
*/
export default function useAnimationVisible(visible: boolean | undefined, afterClose?: () => void): [realVisible: boolean | undefined, activeAnimation: ActiveAnimationType, onAnimationEnd: () => void];