UNPKG
@legion-ui-kit/react-core
Version:
alpha (1.3.0-alpha.1)
latest (1.2.0)
1.3.0-alpha.1
1.2.0
1.1.1
1.1.0
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
To install the package into your project:
@legion-ui-kit/react-core
/
dist
/
cjs
/
components
/
Pagination
/
Pagination.helper.cjs
3 lines
(2 loc)
•
270 B
JavaScript
View Raw
1
2
3
"use strict"
;
exports
.
getPageNumbers
=
(
s=
1
,t=
1
)=>
{
const
e=[];
if
(s<=
7
)
for
(
let
t=
1
;t<=s;t++)e.
push
(t);
else
t<
5
?e.
push
(
1
,
2
,
3
,
4
,
5
,
"dots"
,s):t>=s-
3
?e.
push
(
1
,
"dots"
,s-
4
,s-
3
,s-
2
,s-
1
,s):e.
push
(
1
,
"dots"
,t-
1
,t,t+
1
,
"dots"
,s);
return
e};
//# sourceMappingURL=Pagination.helper.cjs.map