react-component-transition
Version:
Easy animations between react component transitions.
8 lines (7 loc) • 828 B
TypeScript
import { AnimationSettings } from "../types";
export declare const animateContainer: (element: HTMLElement, prevClientRect: ClientRect, nextClientRect: ClientRect, duration?: number, easing?: string) => Animation;
export declare const animateEnter: (element: HTMLElement | null, clientRect: ClientRect | null, settings?: AnimationSettings | AnimationSettings[]) => Animation[];
export declare const animateExit: (element: HTMLElement | null, clientRect: ClientRect | null, settings?: AnimationSettings | AnimationSettings[]) => Animation[];
export declare function finishAnimation(animation: Animation | Animation[]): Promise<void>;
export declare const isAnimationRunning: (animation: Animation | Animation[] | null) => boolean;
export declare const cancelAnimation: (animation: Animation | Animation[] | null) => void;