@bodynarf/react.components 1.4.26 → 1.4.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,7 +22,7 @@ export default function Paginator({ count, onPageChange, currentPage, position,
22
22
  const pageNumbers = useMemo(() => generatePageNumbers(page, count, nearPagesCount), [page, count]);
23
23
  const canGoBack = useMemo(() => page > 1, [page]);
24
24
  const canGoForward = useMemo(() => page < count, [page, count]);
25
- if (pageNumbers.length === 0) {
25
+ if (pageNumbers.length <= 1) {
26
26
  return _jsx(_Fragment, {});
27
27
  }
28
28
  const classNames = getClassName([
@@ -7,7 +7,7 @@
7
7
  * @returns Array of nearest numbers to current page
8
8
  */
9
9
  export const generatePageNumbers = (page, count, size = 3) => {
10
- if (page < 0 || count <= 0 || page > count || size > count) {
10
+ if (page < 0 || count <= 0 || page > count) {
11
11
  return [];
12
12
  }
13
13
  return [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bodynarf/react.components",
3
- "version": "1.4.26",
3
+ "version": "1.4.28",
4
4
  "author": {
5
5
  "name": "Artem",
6
6
  "email": "bodynar@gmail.com"