mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-11 19:42:23 +08:00
* Support Partial<> on setState now that TS 2.1 is out * Update readme to reflect setState being typed correctly * Switch setState to Pick * Restore cloneELement portion of readme * Use Pick<> | S for setState due to cast issue * state and props should be readonly * Fix nit + document why we * Add typescript compiler header * Update to properly order headers * Update readme to reflect 2.1.5 fixing stPick * Update readme now that 2.1.5 is out * All that depend on react now require 2.1 * Fix definition that fails due to readonly state
108 lines
2.2 KiB
TypeScript
108 lines
2.2 KiB
TypeScript
// 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
|
|
// TypeScript Version: 2.1
|
|
|
|
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;
|
|
}
|
|
|
|
declare const ReactPaginate: React.ComponentClass<ReactPaginateProps>;
|
|
export = ReactPaginate;
|