Created
February 25, 2017 14:13
-
-
Save masahirompp/8afdbc948563834fabcffcce8c84a2e3 to your computer and use it in GitHub Desktop.
react-dimensions.d.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare module 'react-dimensions' { | |
import * as React from 'react' | |
interface Dimensions { | |
<P extends React.Props<any>>(options?: Options): (component: React.ComponentClass<P>) => React.ComponentClass<P> | |
} | |
declare const Dimensions: Dimensions | |
export default Dimensions | |
export interface Options { | |
getHeight?: (element: Element) => number | |
getWidth?: (element: Element) => number | |
debounce?: number | |
debounceOpts?: { | |
leading?: boolean | |
maxWait?: number | |
trailing?: boolean | |
} | |
containerStyle?: Object | |
className?: string | |
elementResize?: boolean | |
} | |
export interface ExtendedProps { | |
containerWidth: number | |
containerHeight: number | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment