@atlaskit/modal-dialog
Version:
A modal dialog displays content that requires user interaction, in a layer above the page.
12 lines (11 loc) • 463 B
TypeScript
import { type RefObject } from 'react';
import type { Transition } from '@atlaskit/motion/types';
import { type ModalDialogProps } from '../../types';
/**
* This will run the respective passed in callback functions when modal is
* opened or closed.
*/
export default function useOnMotionFinish({ onOpenComplete, onCloseComplete, }: Pick<ModalDialogProps, 'onOpenComplete' | 'onCloseComplete'>): [
RefObject<HTMLElement>,
(state: Transition) => void
];