import { Component, Key, ReactElement } from 'react'; import PropTypes from 'prop-types'; import AnimateChild from './AnimateChild'; export interface AnimateProps { className?: string; component?: any; componentProps?: object; animation?: object; transitionName?: string | object; transitionEnter?: boolean; transitionAppear?: boolean; exclusive?: boolean; transitionLeave?: boolean; onEnd?: (key: Key | null, flag: boolean, childRef: AnimateChild) => void; onEnter?: (key: Key | null, childRef: AnimateChild) => void; onLeave?: (key: Key | null, childRef: AnimateChild) => void; onAppear?: (key: Key | null, childRef: AnimateChild) => void; hiddenProp?: string; } export interface AnimateState { children: ReactElement[]; } export default class Animate extends Component { static displayName: string; static propTypes: { component: PropTypes.Requireable; componentProps: PropTypes.Requireable; animation: PropTypes.Requireable; transitionName: PropTypes.Requireable; transitionEnter: PropTypes.Requireable; transitionAppear: PropTypes.Requireable; exclusive: PropTypes.Requireable; transitionLeave: PropTypes.Requireable; onEnd: PropTypes.Requireable<(...args: any[]) => any>; onEnter: PropTypes.Requireable<(...args: any[]) => any>; onLeave: PropTypes.Requireable<(...args: any[]) => any>; onAppear: PropTypes.Requireable<(...args: any[]) => any>; hiddenProp: PropTypes.Requireable; }; static defaultProps: { animation: {}; component: string; componentProps: {}; transitionEnter: boolean; transitionLeave: boolean; transitionAppear: boolean; }; currentlyAnimatingKeys: {}; keysToEnter: Key[]; keysToLeave: Key[]; state: AnimateState; childrenRefs: {}; nextProps?: object; componentDidMount(): void; componentWillReceiveProps(nextProps: any): void; componentDidUpdate(): void; isValidChildByKey(currentChildren: any, key: any): boolean; stop(key: any): void; render(): ReactElement ReactElement Component)> | null) | (new (props: any) => Component)>; performEnter: (key: string | number) => void; performAppear: (key: string | number) => void; handleDoneAdding: (key: string | number, type: any, childRef: any) => void; performLeave: (key: string | number) => void; handleDoneLeaving: (key: string | number, childRef: any) => void; }