From 21c1caeb7a709514841de3fa24026fb24697f521 Mon Sep 17 00:00:00 2001 From: Simon Hartcher Date: Mon, 15 Aug 2016 11:16:29 +1000 Subject: [PATCH] Add react-paginate 2.1.3 --- react-paginate/index.d.ts | 108 ++++++++++++++++++++++++ react-paginate/react-paginate-tests.tsx | 14 +++ react-paginate/tsconfig.json | 20 +++++ 3 files changed, 142 insertions(+) create mode 100644 react-paginate/index.d.ts create mode 100644 react-paginate/react-paginate-tests.tsx create mode 100644 react-paginate/tsconfig.json diff --git a/react-paginate/index.d.ts b/react-paginate/index.d.ts new file mode 100644 index 0000000000..8ae89ce2fd --- /dev/null +++ b/react-paginate/index.d.ts @@ -0,0 +1,108 @@ +// Type definitions for react-paginate 2.1.3 +// Project: https://github.com/AdeleD/react-paginate +// Definitions by: Simon Hartcher +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module "react-paginate" { + import * as React from "react"; + + interface ReactPaginateProps { + /** + * The total number of pages. + */ + pageNum: number; + + /** + * The range of pages displayed. + */ + pageRangeDisplayed: number; + + /** + * The number of pages to display for margins. + */ + marginPagesDisplayed: number; + + /** + * Label for the `previous` button. + */ + previousLabel?: string | JSX.Element; + + /** + * Label for the `next` button. + */ + nextLabel?: string | JSX.Element; + + /** + * Label for ellipsis. + */ + breakLabel?: string | JSX.Element; + + /** + * The classname on tag `li` of the ellipsis element. + */ + breakClassName?: string | JSX.Element; + + /** + * The method to call when a page is clicked. + */ + clickCallback?: Function; + + /** + * The initial page selected. + */ + initialSelected?: number; + + /** + * To override selected page with parent prop. + */ + forceSelected?: number; + + /** + * The classname of the pagination container. + */ + containerClassName?: string; + + /** + * The classname on tag `li` of each page element. + */ + pageClassName?: string; + + /** + * The classname on tag `a` of each page element. + */ + pageLinkClassName?: string; + + /** + * The classname for the active page. + */ + activeClassName?: string; + + /** + * The classname on tag `li` of the `previous` button. + */ + previousClassName?: string; + + /** + * The classname on tag `li` of the `next` button. + */ + nextClassName?: string; + + /** + * The classname on tag `a` of the `previous` button. + */ + previousLinkClassName?: string; + + /** + * The classname on tag `a` of the `next` button. + */ + nextLinkClassName?: string; + + /** + * The classname for disabled `previous` and `next` buttons. + */ + disabledClassName?: string; + } + + const ReactPaginate: React.ComponentClass; + export = ReactPaginate; +} diff --git a/react-paginate/react-paginate-tests.tsx b/react-paginate/react-paginate-tests.tsx new file mode 100644 index 0000000000..2ae495eacf --- /dev/null +++ b/react-paginate/react-paginate-tests.tsx @@ -0,0 +1,14 @@ +import * as React from "react"; +import ReactPaginate = require("react-paginate"); + +class Test extends React.Component<{}, {}> { + public render() { + return ( + + ); + } +} diff --git a/react-paginate/tsconfig.json b/react-paginate/tsconfig.json new file mode 100644 index 0000000000..17c1f2e6f1 --- /dev/null +++ b/react-paginate/tsconfig.json @@ -0,0 +1,20 @@ +{ + "files": [ + "index.d.ts", + "react-paginate-tests.tsx" + ], + "compilerOptions": { + "module": "commonjs", + "target": "es6", + "noImplicitAny": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react" + } +}