You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
InternshipProject/node_modules/rc-resize-observer/es/Collection.d.ts

20 lines
720 B

import * as React from 'react';
import type { SizeInfo } from '.';
declare type onCollectionResize = (size: SizeInfo, element: HTMLElement, data: any) => void;
export declare const CollectionContext: React.Context<onCollectionResize>;
export interface ResizeInfo {
size: SizeInfo;
data: any;
element: HTMLElement;
}
export interface CollectionProps {
/** Trigger when some children ResizeObserver changed. Collect by frame render level */
onBatchResize?: (resizeInfo: ResizeInfo[]) => void;
children?: React.ReactNode;
}
/**
* Collect all the resize event from children ResizeObserver
*/
export declare function Collection({ children, onBatchResize }: CollectionProps): JSX.Element;
export {};