diff --git a/react-sticky/index.d.ts b/react-sticky/index.d.ts new file mode 100644 index 0000000000..b3070b046a --- /dev/null +++ b/react-sticky/index.d.ts @@ -0,0 +1,27 @@ +// Type definitions for react-sticky 5.0 +// Project: https://github.com/captivationsoftware/react-sticky +// Definitions by: Matej Lednicky , Curtis Warren +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +import * as React from "react"; + +declare module "react-sticky" { + + export var StickyContainer: React.ComponentClass>; + + export interface StickyProps { + isActive: boolean; + className: string; + style: any; + stickyClassName: string; + stickyStyle: any; + topOffset: number; + bottomOffset: number; + onStickyStateChange: (isSticky: boolean) => void; + } + + export var Sticky: React.ComponentClass; + +} + diff --git a/react-sticky/react-sticky-tests.tsx b/react-sticky/react-sticky-tests.tsx new file mode 100644 index 0000000000..7ab99bf0c7 --- /dev/null +++ b/react-sticky/react-sticky-tests.tsx @@ -0,0 +1,9 @@ +import {Sticky, StickyContainer} from "react-sticky"; +import * as React from "react"; + +const StickyComponent: JSX.Element = + + undefined}> + + ; + diff --git a/react-sticky/tsconfig.json b/react-sticky/tsconfig.json new file mode 100644 index 0000000000..e2ea2938d1 --- /dev/null +++ b/react-sticky/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "jsx": "react", + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "react-sticky-tests.tsx" + ] +} + diff --git a/react-sticky/tslint.json b/react-sticky/tslint.json new file mode 100644 index 0000000000..ccdb64abf2 --- /dev/null +++ b/react-sticky/tslint.json @@ -0,0 +1,2 @@ +{ "extends": "../tslint.json" } +