Updated @types/react-paginate to version 4.2.0

This commit is contained in:
Wouter Hardeman
2017-03-16 18:34:54 +01:00
parent 9e1f287385
commit ca622833a6
2 changed files with 18 additions and 8 deletions
+17 -7
View File
@@ -1,6 +1,6 @@
// Type definitions for react-paginate 2.1.3
// Type definitions for react-paginate 4.2.0
// Project: https://github.com/AdeleD/react-paginate
// Definitions by: Simon Hartcher <https://github.com/deevus>
// Definitions by: Simon Hartcher <https://github.com/deevus>, Wouter Hardeman <https://github.com/wouterhardeman>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
@@ -10,7 +10,7 @@ interface ReactPaginateProps {
/**
* The total number of pages.
*/
pageNum: number;
pageCount: number;
/**
* The range of pages displayed.
@@ -43,19 +43,24 @@ interface ReactPaginateProps {
breakClassName?: string | JSX.Element;
/**
* The method to call when a page is clicked.
* The method to call when a page is clicked. Exposes the current page object as an argument.
*/
clickCallback?: Function;
onPageChange?: Function;
/**
* The initial page selected.
*/
initialSelected?: number;
initialPage?: number;
/**
* To override selected page with parent prop.
*/
forceSelected?: number;
forcePage?: number;
/**
* Disable `onPageChange` callback with initial page. Default: `false`
*/
disableInitialCallback?: boolean
/**
* The classname of the pagination container.
@@ -101,6 +106,11 @@ interface ReactPaginateProps {
* The classname for disabled `previous` and `next` buttons.
*/
disabledClassName?: string;
/**
* The method is called to generate the `href` attribute value on tag `a` of each page element.
*/
hrefBuilder?: Function;
}
declare const ReactPaginate: React.ComponentClass<ReactPaginateProps>;
+1 -1
View File
@@ -5,7 +5,7 @@ class Test extends React.Component<{}, {}> {
public render() {
return (
<ReactPaginate
pageNum={1}
pageCount={1}
pageRangeDisplayed={10}
marginPagesDisplayed={2}
/>