import { AnimationProps } from './Animation'; import PropTypes from 'prop-types'; import React, { Component } from 'react'; import noop from './utils/noop'; export interface TransitionProps extends AnimationProps { children?: React.ReactNode | ((TransitionProps: any) => any); from?: Record; enter?: Record; leave?: Record; state?: string | boolean; willEnter?: (value: any) => void; didEnter?: (value: any) => void; willLeave?: (value: any) => void; didLeave?: (value: any) => void; onRest?: (value: any) => void; onStart?: (value: any) => void; } export interface TransitionState { state: string | boolean; lastChildren: React.ReactNode | ((TransitionProps: any) => React.ReactNode | any); currentChildren: React.ReactNode | ((TransitionProps: any) => React.ReactNode | any); } export default class Transition extends Component { static propTypes: { children: PropTypes.Requireable; from: PropTypes.Requireable; enter: PropTypes.Requireable; leave: PropTypes.Requireable; willEnter: PropTypes.Requireable<(...args: any[]) => any>; didEnter: PropTypes.Requireable<(...args: any[]) => any>; willLeave: PropTypes.Requireable<(...args: any[]) => any>; didLeave: PropTypes.Requireable<(...args: any[]) => any>; state: PropTypes.Requireable>; }; static defaultProps: { willEnter: typeof noop; didEnter: typeof noop; willLeave: typeof noop; didLeave: typeof noop; onStart: typeof noop; onRest: typeof noop; }; instance: any; constructor(props?: {}); static getDerivedStateFromProps(props: TransitionProps, state: TransitionState): Partial; componentWillUnmount(): void; _isControlled: () => boolean; forwardInstance: (instance: any) => void; onRest: (props: any) => void; onStart: (props: any) => void; render(): React.JSX.Element; }