mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
Merge pull request #10616 from deevus/types-2.0
Add react-paginate 2.1.3
This commit is contained in:
Vendored
+108
@@ -0,0 +1,108 @@
|
||||
// Type definitions for react-paginate 2.1.3
|
||||
// Project: https://github.com/AdeleD/react-paginate
|
||||
// Definitions by: Simon Hartcher <https://github.com/deevus>
|
||||
// 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<ReactPaginateProps>;
|
||||
export = ReactPaginate;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import * as React from "react";
|
||||
import ReactPaginate = require("react-paginate");
|
||||
|
||||
class Test extends React.Component<{}, {}> {
|
||||
public render() {
|
||||
return (
|
||||
<ReactPaginate
|
||||
pageNum={1}
|
||||
pageRangeDisplayed={10}
|
||||
marginPagesDisplayed={2}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user