File tree Expand file tree Collapse file tree 5 files changed +17
-6
lines changed
Expand file tree Collapse file tree 5 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @nordcloud/gnui" ,
33 "description" : " Nordcloud Design System - a collection of reusable React components used in Nordcloud's SaaS products" ,
4- "version" : " 11.2.1 " ,
4+ "version" : " 11.2.2 " ,
55 "license" : " MIT" ,
66 "repository" : {
77 "type" : " git" ,
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ function Pagination({
1616 set,
1717 size,
1818 firstPage = 0 ,
19+ small,
1920} : IExtendedPaginationProps ) {
2021 const currentPage = Math . ceil ( from / size ) ;
2122 const nPages = Math . ceil ( count / size ) ;
@@ -60,10 +61,9 @@ function Pagination({
6061
6162 return (
6263 < nav
63- className = " pagination"
64+ className = { ` pagination ${ ! small ? "center-absolutely" : "" } ` }
6465 role = "navigation"
6566 aria-label = "pagination"
66- style = { { transform : "translate(-50%, 0)" } }
6767 >
6868 < ul className = "pagination-list" >
6969 < When condition = { currentPage > firstPage } >
@@ -172,6 +172,7 @@ export function ExtendedPaginationBox({
172172 />
173173 ) }
174174 < Pagination
175+ small = { small }
175176 from = { from }
176177 set = { setPage }
177178 size = { size }
Original file line number Diff line number Diff line change 11import styled from "styled-components" ;
2- import theme from "../../theme" ;
2+ import theme , { bp } from "../../theme" ;
33
44type Props = {
55 sidebar ?: boolean ;
@@ -8,6 +8,7 @@ type Props = {
88
99export const StyledPaginationBox = styled . nav < Props > `
1010 display: flex;
11+ position: relative;
1112 flex-wrap: wrap;
1213 flex: ${ ( { sidebar } ) => ( sidebar ? 1 : 0 ) } ;
1314 background-color: ${ theme . color . background . ui03 } ;
@@ -43,6 +44,14 @@ export const StyledPaginationBox = styled.nav<Props>`
4344 margin: 0;
4445 }
4546
47+ ${ bp ( "lg" ) `
48+ .center-absolutely {
49+ position: absolute;
50+ left: 50%;
51+ transform: translate(-50%, 0);
52+ }
53+ ` }
54+
4655 button {
4756 display: flex;
4857 align-items: center;
Original file line number Diff line number Diff line change @@ -19,4 +19,5 @@ export type IPaginationProps = {
1919
2020export type IExtendedPaginationProps = Omit < IPaginationProps , "current" > & {
2121 from : number ;
22+ small ?: boolean ;
2223} ;
You can’t perform that action at this time.
0 commit comments