UNPKG

@react-motion-router/core

Version:

Declarative routing library for ReactJS ⚛ with animations baked in ⏮

39 lines (38 loc) 1.46 kB
import { SharedElementScene } from './SharedElement'; import { MotionProgressEvent } from './MotionEvents'; import AnimationLayerData, { AnimationLayerDataContext } from './AnimationLayerData'; import NavigationBase from './NavigationBase'; import { Component } from 'react'; interface GhostLayerProps { instance?: (instance: GhostLayer | null) => any; backNavigating: boolean; gestureNavigating: boolean; navigation: NavigationBase; animationLayerData: AnimationLayerData; } interface GhostLayerState { transitioning: boolean; playing: boolean; } export default class GhostLayer extends Component<GhostLayerProps, GhostLayerState> { private ref; private _currentScene; private _nextScene; static contextType: import("react").Context<AnimationLayerData>; context: React.ContextType<typeof AnimationLayerDataContext>; private onProgressStartListener; private onProgressListener; private onProgressEndListener; state: GhostLayerState; set currentScene(scene: SharedElementScene); set nextScene(scene: SharedElementScene); finish(): void; sharedElementTransition(currentScene: SharedElementScene, nextScene: SharedElementScene): void; componentDidMount(): void; componentWillUnmount(): void; onProgressStart(): void; onProgress(e: MotionProgressEvent): void; onProgressEnd(): void; render(): JSX.Element; } export {};