UNPKG

@s-ui/react-molecule-pagination

Version:

`MoleculePagination` is a component that displays a range of pages with the current page highlighted and the proper buttons to navigate across the available pages in the entire range of total pages

13 lines 458 B
/** * Gets the next page number taking into account possible compressed mode * @param {object} params - parameters pagination * @param {number} params.page - Original page number * @param {number} params.totalPages - Total number of pages * @return {number} next page number */ var nextPage = function nextPage(_ref) { var page = _ref.page, totalPages = _ref.totalPages; return page !== totalPages ? page + 1 : null; }; export default nextPage;