UNPKG

@daphneb/phonereporting

Version:

48 lines (39 loc) 1.53 kB
/* Griddle - Simple Grid Component for React https://github.com/DynamicTyped/Griddle Copyright (c) 2014 Ryan Lanciaux | DynamicTyped See License / Disclaimer https://raw.githubusercontent.com/DynamicTyped/Griddle/master/LICENSE */ "use strict"; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i];for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } }return target; }; var React = require('react'); var CustomPaginationContainer = React.createClass({ displayName: "CustomPaginationContainer", getDefaultProps: function getDefaultProps() { return { "maxPage": 0, "nextText": "", "previousText": "", "currentPage": 0, "customPagerComponent": {}, "customPagerComponentOptions": {} }; }, render: function render() { var that = this; if (typeof that.props.customPagerComponent !== 'function') { console.log("Couldn't find valid template."); return React.createElement("div", null); } return React.createElement(that.props.customPagerComponent, _extends({}, this.props.customPagerComponentOptions, { maxPage: this.props.maxPage, nextText: this.props.nextText, previousText: this.props.previousText, currentPage: this.props.currentPage, setPage: this.props.setPage, previous: this.props.previous, next: this.props.next })); } }); module.exports = CustomPaginationContainer;