Commit 413351b 1 parent 2ec8c40 commit 413351b Copy full SHA for 413351b
File tree 1 file changed +18
-2
lines changed
1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change 1
1
import { ChevronLeft , ChevronRight } from '@carbon/icons-react' ;
2
+ import styled from '@emotion/styled' ;
2
3
import { IconButton , getConfigDefault } from '@tablecheck/tablekit-react' ;
3
4
import * as React from 'react' ;
4
5
5
6
import { useDatePickerContext } from '../Root' ;
6
7
8
+ const IconWrapper = styled . span `
9
+ display: flex;
10
+ align-items: center;
11
+ justify-content: center;
12
+ & > svg {
13
+ [dir='rtl'] & {
14
+ transform: rotate(180deg);
15
+ }
16
+ }
17
+ ` ;
18
+
7
19
export const PreviousMonth = React . forwardRef <
8
20
HTMLButtonElement ,
9
21
Omit < React . HTMLAttributes < HTMLButtonElement > , 'children' >
@@ -17,7 +29,9 @@ export const PreviousMonth = React.forwardRef<
17
29
type = "button"
18
30
ref = { ref }
19
31
>
20
- < ChevronLeft size = { getConfigDefault ( 'iconSize' ) } />
32
+ < IconWrapper >
33
+ < ChevronLeft size = { getConfigDefault ( 'iconSize' ) } />
34
+ </ IconWrapper >
21
35
</ IconButton >
22
36
) ;
23
37
} ) ;
@@ -34,7 +48,9 @@ export const NextMonth = React.forwardRef<
34
48
type = "button"
35
49
ref = { ref }
36
50
>
37
- < ChevronRight size = { getConfigDefault ( 'iconSize' ) } />
51
+ < IconWrapper >
52
+ < ChevronRight size = { getConfigDefault ( 'iconSize' ) } />
53
+ </ IconWrapper >
38
54
</ IconButton >
39
55
) ;
40
56
} ) ;
You can’t perform that action at this time.
0 commit comments