rc-target-size
Version:
a tool help get size of element for React, support higher-order component and component render.
28 lines (22 loc) • 457 B
Flow
/* eslint-disable no-unused-vars */
type TImageSource = string | null
type TProps = { [key: string]: any }
type TState = {
canUseDOM: boolean,
height: number,
width: number,
offset: {
x: number,
y: number,
}
}
type TConfig = {
querySelector?: string,
rate?: number,
mode?: string,
handleWidth?: boolean,
handleHeight?: boolean,
mapStateToProps?: Function,
onSize?: Function,
};
type TChildProps = { [key: string]: any }