@@ -13,8 +13,8 @@ const Container = styled.div`
1313
1414const ButtonsContainer = styled ( Box ) `
1515 display: flex;
16- justify-content : center;
17- position: relative ;
16+ align-items : center;
17+ gap: ${ Spaces [ 1 ] } ;
1818` ;
1919
2020const IconButton = styled . button `
@@ -134,49 +134,54 @@ const Pagination: React.FC<PaginationProps> = ({
134134 return (
135135 < Container >
136136 < ButtonsContainer >
137- { hasMultiplePageSizes && (
138- < Box aria-label = { ariaLabelSelectPageSizeContainer } position = "absolute" left = "0" width = "4.5em" >
139- < SelectList
140- options = { pageSizes }
141- onChange = { onSelectPageSize }
142- value = { pageSizes . find ( sizeOption => sizeOption . value === pageSize . toString ( ) ) }
143- />
144- </ Box >
145- ) }
146- { size !== 'small' && (
147- < IconButton aria-label = { ariaLabelFirst } disabled = { isFirstPage } onClick = { onSkipBackward } >
148- < BackwardLastIcon
137+ < Box flex = { 1 } >
138+ { hasMultiplePageSizes && (
139+ < Box aria-label = { ariaLabelSelectPageSizeContainer } width = "fit-content" minWidth = "5rem" >
140+ < SelectList
141+ options = { pageSizes }
142+ onChange = { onSelectPageSize }
143+ value = { pageSizes . find ( sizeOption => sizeOption . value === pageSize . toString ( ) ) }
144+ />
145+ </ Box >
146+ ) }
147+ </ Box >
148+
149+ < Box >
150+ { size !== 'small' && (
151+ < IconButton aria-label = { ariaLabelFirst } disabled = { isFirstPage } onClick = { onSkipBackward } >
152+ < BackwardLastIcon
153+ size = "small"
154+ color = { isFirstPage ? Colors . AUTHENTIC_BLUE_200 : Colors . AUTHENTIC_BLUE_900 }
155+ />
156+ </ IconButton >
157+ ) }
158+
159+ < IconButton aria-label = { ariaLabelPrevious } disabled = { isFirstPage } onClick = { onPrevPage } >
160+ < BackwardIcon
149161 size = "small"
150162 color = { isFirstPage ? Colors . AUTHENTIC_BLUE_200 : Colors . AUTHENTIC_BLUE_900 }
151163 />
152164 </ IconButton >
153- ) }
154-
155- < IconButton aria-label = { ariaLabelPrevious } disabled = { isFirstPage } onClick = { onPrevPage } >
156- < BackwardIcon
157- size = "small"
158- color = { isFirstPage ? Colors . AUTHENTIC_BLUE_200 : Colors . AUTHENTIC_BLUE_900 }
159- />
160- </ IconButton >
161-
162- < IconButton aria-label = { ariaLabelNext } disabled = { isLastPage } onClick = { onNextPage } >
163- < ForwardIcon
164- size = "small"
165- color = { isLastPage ? Colors . AUTHENTIC_BLUE_200 : Colors . AUTHENTIC_BLUE_900 }
166- />
167- </ IconButton >
168-
169- { size !== 'small' && (
170- < IconButton aria-label = { ariaLabelLast } disabled = { isLastPage } onClick = { onSkipForward } >
171- < ForwardLastIcon
165+
166+ < IconButton aria-label = { ariaLabelNext } disabled = { isLastPage } onClick = { onNextPage } >
167+ < ForwardIcon
172168 size = "small"
173169 color = { isLastPage ? Colors . AUTHENTIC_BLUE_200 : Colors . AUTHENTIC_BLUE_900 }
174170 />
175171 </ IconButton >
176- ) }
177- </ ButtonsContainer >
178172
179- { label && < LabelContainer > { label } </ LabelContainer > }
173+ { size !== 'small' && (
174+ < IconButton aria-label = { ariaLabelLast } disabled = { isLastPage } onClick = { onSkipForward } >
175+ < ForwardLastIcon
176+ size = "small"
177+ color = { isLastPage ? Colors . AUTHENTIC_BLUE_200 : Colors . AUTHENTIC_BLUE_900 }
178+ />
179+ </ IconButton >
180+ ) }
181+ </ Box >
182+
183+ < Box flex = { 1 } > { label && < LabelContainer > { label } </ LabelContainer > } </ Box >
184+ </ ButtonsContainer >
180185 </ Container >
181186 ) ;
182187} ;
0 commit comments