1
1
import React , { ReactNode } from 'react' ;
2
2
import styled from 'styled-components' ;
3
-
4
- import { Colors } from '../../essentials/Colors/Colors' ;
5
3
import { Spaces } from '../../essentials/Spaces/Spaces' ;
6
4
import { BackwardIcon , BackwardLastIcon , ForwardIcon , ForwardLastIcon } from '../../icons' ;
7
5
import { Box } from '../Box/Box' ;
8
6
import { SelectList } from '../SelectList/SelectList' ;
7
+ import { getSemanticValue } from '../../utils/cssVariables' ;
9
8
10
9
const Container = styled . div `
11
10
text-align: center;
@@ -19,8 +18,8 @@ const ButtonsContainer = styled(Box)`
19
18
20
19
const IconButton = styled . button `
21
20
align-items: center;
22
- background-color: ${ Colors . WHITE } ;
23
- border: 0.0625rem solid ${ Colors . AUTHENTIC_BLUE_200 } ;
21
+ background-color: ${ getSemanticValue ( 'background-primary-default' ) } ;
22
+ border: 0.0625rem solid ${ getSemanticValue ( 'border-secondary-default' ) } ;
24
23
border-radius: 0.25rem;
25
24
display: inline-flex;
26
25
height: 2.5rem;
@@ -33,7 +32,7 @@ const IconButton = styled.button`
33
32
}
34
33
35
34
&:hover:not(:disabled) {
36
- background-color: ${ Colors . AUTHENTIC_BLUE_50 } ;
35
+ background-color: ${ getSemanticValue ( 'background-secondary-default' ) } ;
37
36
cursor: pointer;
38
37
}
39
38
` ;
@@ -147,30 +146,46 @@ const Pagination: React.FC<PaginationProps> = ({
147
146
< IconButton aria-label = { ariaLabelFirst } disabled = { isFirstPage } onClick = { onSkipBackward } >
148
147
< BackwardLastIcon
149
148
size = "small"
150
- color = { isFirstPage ? Colors . AUTHENTIC_BLUE_200 : Colors . AUTHENTIC_BLUE_900 }
149
+ color = {
150
+ isFirstPage
151
+ ? getSemanticValue ( 'icon-disabled-default' )
152
+ : getSemanticValue ( 'icon-primary-default' )
153
+ }
151
154
/>
152
155
</ IconButton >
153
156
) }
154
157
155
158
< IconButton aria-label = { ariaLabelPrevious } disabled = { isFirstPage } onClick = { onPrevPage } >
156
159
< BackwardIcon
157
160
size = "small"
158
- color = { isFirstPage ? Colors . AUTHENTIC_BLUE_200 : Colors . AUTHENTIC_BLUE_900 }
161
+ color = {
162
+ isFirstPage
163
+ ? getSemanticValue ( 'icon-disabled-default' )
164
+ : getSemanticValue ( 'icon-primary-default' )
165
+ }
159
166
/>
160
167
</ IconButton >
161
168
162
169
< IconButton aria-label = { ariaLabelNext } disabled = { isLastPage } onClick = { onNextPage } >
163
170
< ForwardIcon
164
171
size = "small"
165
- color = { isLastPage ? Colors . AUTHENTIC_BLUE_200 : Colors . AUTHENTIC_BLUE_900 }
172
+ color = {
173
+ isLastPage
174
+ ? getSemanticValue ( 'icon-disabled-default' )
175
+ : getSemanticValue ( 'icon-primary-default' )
176
+ }
166
177
/>
167
178
</ IconButton >
168
179
169
180
{ size !== 'small' && (
170
181
< IconButton aria-label = { ariaLabelLast } disabled = { isLastPage } onClick = { onSkipForward } >
171
182
< ForwardLastIcon
172
183
size = "small"
173
- color = { isLastPage ? Colors . AUTHENTIC_BLUE_200 : Colors . AUTHENTIC_BLUE_900 }
184
+ color = {
185
+ isLastPage
186
+ ? getSemanticValue ( 'icon-disabled-default' )
187
+ : getSemanticValue ( 'icon-primary-default' )
188
+ }
174
189
/>
175
190
</ IconButton >
176
191
) }
0 commit comments