UNPKG

722 BTypeScriptView Raw
1import * as React from 'react';
2export type TransitionContextValue = {
3 /**
4 * `true`, if the current element was requested to appear.
5 */
6 requestedEnter: boolean;
7 /**
8 * Callback to be called when the element has completely exited.
9 */
10 onExited: () => void;
11 /**
12 * Registers a child transition.
13 * This is used to notify the parent `useTransitionTrigger` hook that a child transition exists
14 * and state changes must be triggered by the context's callbck functions.
15 *
16 * Returns a function to unregister the child transition.
17 */
18 registerTransition: () => () => void;
19};
20export declare const TransitionContext: React.Context<TransitionContextValue | null>;