react-responsive-pagination
Advanced tools
Comparing version 2.6.0-beta.3 to 2.6.0-beta.4
# React Responsive Pagination Changelog | ||
# [2.6.0-beta.4](https://github.com/jonelantha/react-responsive-pagination/compare/v2.6.0-beta.3...v2.6.0-beta.4) (2024-05-11) | ||
### Bug Fixes | ||
* Restore propTypes ([f76aebe](https://github.com/jonelantha/react-responsive-pagination/commit/f76aebeb7db35f2b8cb42cc95b5f7f41ffa509f0)) | ||
# [2.6.0-beta.3](https://github.com/jonelantha/react-responsive-pagination/compare/v2.6.0-beta.2...v2.6.0-beta.3) (2024-05-11) | ||
@@ -4,0 +11,0 @@ |
@@ -133,2 +133,5 @@ import type { FC } from 'react'; | ||
/** | ||
* @public | ||
*/ | ||
declare const ResponsivePaginationComponent: FC<ResponsivePaginationProps>; | ||
@@ -135,0 +138,0 @@ export default ResponsivePaginationComponent; |
@@ -10,13 +10,14 @@ import React, { memo, useEffect } from 'react'; | ||
export * from './labelBehaviour.js'; | ||
const ResponsivePaginationComponent = process.env.NODE_ENV !== 'production' | ||
? memo(ResponsivePaginationDev) | ||
: memo(ResponsivePagination); | ||
/** | ||
* @public | ||
*/ | ||
const ResponsivePaginationComponent = memo(ResponsivePagination); | ||
export default ResponsivePaginationComponent; | ||
function ResponsivePaginationDev(props) { | ||
checkLegacyProps(props); | ||
return ResponsivePagination(props); | ||
} | ||
/* eslint-disable jsx-a11y/anchor-is-valid */ | ||
function ResponsivePagination({ current, total, onPageChange: handlePageChange, maxWidth, narrowBehaviour, className, extraClassName = 'justify-content-center', pageItemClassName = 'page-item', pageLinkClassName = 'page-link', activeItemClassName = 'active', disabledItemClassName = 'disabled', navClassName, previousClassName, nextClassName, previousLabel, nextLabel, ariaPreviousLabel, ariaNextLabel, renderNav = true, ariaCurrentAttr = true, linkHref = 'hash', labelBehaviour: getLabel = defaultLabelBehaviour, }) { | ||
function ResponsivePagination(props) { | ||
incRenderCount(); | ||
if (process.env.NODE_ENV !== 'production') { | ||
checkLegacyProps(props); | ||
} | ||
const { current, total, onPageChange: handlePageChange, maxWidth, narrowBehaviour, className, extraClassName = 'justify-content-center', pageItemClassName = 'page-item', pageLinkClassName = 'page-link', activeItemClassName = 'active', disabledItemClassName = 'disabled', navClassName, previousClassName, nextClassName, previousLabel, nextLabel, ariaPreviousLabel, ariaNextLabel, renderNav = true, ariaCurrentAttr = true, linkHref = 'hash', labelBehaviour: getLabel = defaultLabelBehaviour, } = props; | ||
const { items, ref, clearCache } = usePaginationItems(current, total, maxWidth, { | ||
@@ -23,0 +24,0 @@ narrowBehaviour, |
{ | ||
"name": "react-responsive-pagination", | ||
"version": "2.6.0-beta.3", | ||
"version": "2.6.0-beta.4", | ||
"description": "React component for responsive pagination", | ||
@@ -5,0 +5,0 @@ "author": "jonelantha", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
87334
1353