UNPKG

1.16 kBTypeScriptView Raw
1import * as React from 'react';
2import type { CSSMotionProps } from './CSSMotion';
3import type { KeyObject } from './util/diff';
4export interface CSSMotionListProps extends Omit<CSSMotionProps, 'onVisibleChanged'>, Omit<React.HTMLAttributes<any>, 'children'> {
5 keys: (React.Key | {
6 key: React.Key;
7 [name: string]: any;
8 })[];
9 component?: string | React.ComponentType | false;
10 /** This will always trigger after final visible changed. Even if no motion configured. */
11 onVisibleChanged?: (visible: boolean, info: {
12 key: React.Key;
13 }) => void;
14}
15export interface CSSMotionListState {
16 keyEntities: KeyObject[];
17}
18/**
19 * Generate a CSSMotionList component with config
20 * @param transitionSupport No need since CSSMotionList no longer depends on transition support
21 * @param CSSMotion CSSMotion component
22 */
23export declare function genCSSMotionList(transitionSupport: boolean, CSSMotion?: React.ForwardRefExoticComponent<CSSMotionProps & {
24 ref?: React.Ref<any>;
25}>): React.ComponentClass<CSSMotionListProps>;
26declare const _default: React.ComponentClass<CSSMotionListProps, any>;
27export default _default;