1 | import * as React from "react";
|
2 | import { AbstractPureComponent2 } from "../../common";
|
3 | import { ResizeEntry } from "./resizeObserverTypes";
|
4 | export declare type ResizeSensorProps = IResizeSensorProps;
|
5 |
|
6 | export interface IResizeSensorProps {
|
7 | |
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | onResize: (entries: ResizeEntry[]) => void;
|
18 | |
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 | observeParents?: boolean;
|
30 | }
|
31 |
|
32 | export declare class ResizeSensor extends AbstractPureComponent2<ResizeSensorProps> {
|
33 | static displayName: string;
|
34 | private element;
|
35 | private observer;
|
36 | render(): string | number | boolean | {} | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | React.ReactPortal | null | undefined;
|
37 | componentDidMount(): void;
|
38 | componentDidUpdate(prevProps: ResizeSensorProps): void;
|
39 | componentWillUnmount(): void;
|
40 | /**
|
41 | * Observe the DOM element, if defined and different from the currently
|
42 | * observed element. Pass `force` argument to skip element checks and always
|
43 | * re-observe.
|
44 | */
|
45 | private observeElement;
|
46 | private getElement;
|
47 | }
|
48 |
|
\ | No newline at end of file |