react-router-pagination 3.1.1 → 3.1.2
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.
- package/package.json +1 -1
- package/src/index.tsx +7 -13
package/package.json
CHANGED
package/src/index.tsx
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
import AbstractPagination, {
|
|
4
|
-
type AbstractPaginationProps,
|
|
5
|
-
type AbstractPaginationState
|
|
6
|
-
} from './pagination/component.tsx'
|
|
1
|
+
import React, { Component } from 'react'
|
|
7
2
|
|
|
8
3
|
import {
|
|
9
4
|
Standard
|
|
@@ -14,18 +9,17 @@ import {
|
|
|
14
9
|
} from './pagination/centered/index.tsx'
|
|
15
10
|
|
|
16
11
|
import {
|
|
17
|
-
|
|
12
|
+
calculateTotalPages,
|
|
13
|
+
calculatePageNumber
|
|
18
14
|
} from './pagination/common/index.mts'
|
|
19
15
|
|
|
20
|
-
export interface PaginationProps
|
|
16
|
+
export interface PaginationProps {
|
|
21
17
|
format?: string
|
|
22
18
|
}
|
|
23
19
|
|
|
24
|
-
export default class Pagination extends
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
totalPages: toInteger(this.props.totalPages)
|
|
28
|
-
}
|
|
20
|
+
export default class Pagination extends Component<PaginationProps> {
|
|
21
|
+
static calculateTotalPages = calculateTotalPages
|
|
22
|
+
static calculatePageNumber = calculatePageNumber
|
|
29
23
|
|
|
30
24
|
render (): JSX.Element {
|
|
31
25
|
const { format, ...props }: PaginationProps = this.props
|