choerodon-ui
Version:
An enterprise-class UI design language and React-based implementation
48 lines (47 loc) • 1.84 kB
TypeScript
import { PureComponent, Key, ReactElement } from 'react';
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<any>[];
}
export default class Animate extends PureComponent<AnimateProps> {
static displayName: string;
static defaultProps: {
component: string;
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<any, string | ((props: any) => ReactElement<any, any> | null) | (new (props: any) => import("react").Component<any, any, any>)>;
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;
}