Skip to content

Commit

Permalink
It's now build
Browse files Browse the repository at this point in the history
  • Loading branch information
lluiscab committed Jul 30, 2017
1 parent 0fefed7 commit 62e0349
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
7 changes: 5 additions & 2 deletions dist/Page.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,15 @@ var Page = function (_Component) {
activeClass = _props2.activeClass,
itemClass = _props2.itemClass,
linkClass = _props2.linkClass,
activeLinkClass = _props2.activeLinkClass,
disabledClass = _props2.disabledClass,
isActive = _props2.isActive,
isDisabled = _props2.isDisabled;


var css = (0, _classnames2.default)((_cx = {}, _defineProperty(_cx, activeClass, isActive), _defineProperty(_cx, disabledClass, isDisabled), _defineProperty(_cx, itemClass, itemClass !== undefined), _cx));
var css = (0, _classnames2.default)(itemClass, (_cx = {}, _defineProperty(_cx, activeClass, isActive), _defineProperty(_cx, disabledClass, isDisabled), _cx));

var linkCss = (0, _classnames2.default)(_defineProperty({}, linkClass, linkClass !== undefined));
var linkCss = (0, _classnames2.default)(linkClass, _defineProperty({}, activeLinkClass, isActive));

return _react2.default.createElement(
"li",
Expand All @@ -92,6 +93,7 @@ Page.propTypes = {
isActive: _propTypes2.default.bool.isRequired,
isDisabled: _propTypes2.default.bool,
activeClass: _propTypes2.default.string,
activeLinkClass: _propTypes2.default.string,
itemClass: _propTypes2.default.string,
linkClass: _propTypes2.default.string,
disabledClass: _propTypes2.default.string
Expand All @@ -101,6 +103,7 @@ Page.defaultProps = {
disabledClass: "disabled",
itemClass: undefined,
linkClass: undefined,
activeLinkCLass: undefined,
isActive: false,
isDisabled: false
};
Expand Down
22 changes: 14 additions & 8 deletions dist/Pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ var Pagination = function (_React$Component) {
activeClass = _props.activeClass,
itemClass = _props.itemClass,
linkClass = _props.linkClass,
activeLinkClass = _props.activeLinkClass,
disabledClass = _props.disabledClass,
hideDisabled = _props.hideDisabled;
hideDisabled = _props.hideDisabled,
hideNavigation = _props.hideNavigation;


var paginationInfo = new _paginator2.default(itemsCountPerPage, pageRangeDisplayed).build(totalItemsCount, activePage);
Expand All @@ -72,12 +74,13 @@ var Pagination = function (_React$Component) {
onClick: onChange,
itemClass: itemClass,
linkClass: linkClass,
activeClass: activeClass
activeClass: activeClass,
activeLinkClass: activeLinkClass
}));
}
}

hideDisabled && !paginationInfo.has_previous_page || pages.unshift(_react2.default.createElement(_Page2.default, {
hideDisabled && !paginationInfo.has_previous_page || hideNavigation || pages.unshift(_react2.default.createElement(_Page2.default, {
key: "prev" + paginationInfo.previous_page,
pageNumber: paginationInfo.previous_page,
onClick: onChange,
Expand All @@ -88,7 +91,7 @@ var Pagination = function (_React$Component) {
disabledClass: disabledClass
}));

hideDisabled && !paginationInfo.has_previous_page || pages.unshift(_react2.default.createElement(_Page2.default, {
hideDisabled && !paginationInfo.has_previous_page || hideNavigation || pages.unshift(_react2.default.createElement(_Page2.default, {
key: "first",
pageNumber: 1,
onClick: onChange,
Expand All @@ -99,7 +102,7 @@ var Pagination = function (_React$Component) {
disabledClass: disabledClass
}));

hideDisabled && !paginationInfo.has_next_page || pages.push(_react2.default.createElement(_Page2.default, {
hideDisabled && !paginationInfo.has_next_page || hideNavigation || pages.push(_react2.default.createElement(_Page2.default, {
key: "next" + paginationInfo.next_page,
pageNumber: paginationInfo.next_page,
onClick: onChange,
Expand All @@ -110,7 +113,7 @@ var Pagination = function (_React$Component) {
disabledClass: disabledClass
}));

hideDisabled && !paginationInfo.has_next_page || pages.push(_react2.default.createElement(_Page2.default, {
hideDisabled && !paginationInfo.has_next_page || hideNavigation || pages.push(_react2.default.createElement(_Page2.default, {
key: "last",
pageNumber: paginationInfo.total_pages,
onClick: onChange,
Expand Down Expand Up @@ -152,8 +155,10 @@ Pagination.propTypes = {
itemClass: _propTypes2.default.string,
linkClass: _propTypes2.default.string,
activeClass: _propTypes2.default.string,
activeLinkClass: _propTypes2.default.string,
disabledClass: _propTypes2.default.string,
hideDisabled: _propTypes2.default.bool
hideDisabled: _propTypes2.default.bool,
hideNavigation: _propTypes2.default.bool
};
Pagination.defaultProps = {
itemsCountPerPage: 10,
Expand All @@ -165,7 +170,8 @@ Pagination.defaultProps = {
lastPageText: "»",
innerClass: "pagination",
itemClass: undefined,
linkClass: undefined
linkClass: undefined,
activeLinkClass: undefined
};
var _default = Pagination;
exports.default = _default;
Expand Down

0 comments on commit 62e0349

Please sign in to comment.