mirror of
https://github.com/streamich/react-use.git
synced 2026-01-18 14:06:52 +00:00
9 lines
521 B
TypeScript
9 lines
521 B
TypeScript
import * as React from 'react';
|
|
export declare type Element = ((state: State) => React.ReactElement<any>) | React.ReactElement<any>;
|
|
export interface State {
|
|
width: number;
|
|
height: number;
|
|
}
|
|
declare const useSize: (element: Element, { width, height }?: Partial<State>) => [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>)>, State];
|
|
export default useSize;
|