Skip to content

Commit 11f7810

Browse files
committed
CalendarHeader - fix RTL arrows image
1 parent 3d1c00d commit 11f7810

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/calendar/header/style.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import {StyleSheet, Platform} from 'react-native';
22
import * as defaultStyle from '../../style';
33
import {Theme} from '../../types';
4+
import constants from '../../commons/constants';
45

56
export default function (theme: Theme = {}) {
67
const appStyle = {...defaultStyle, ...theme};
8+
const flipStyle = constants.isRTL ? {transform: [{scaleX: -1}]} : undefined;
79
return StyleSheet.create({
810
header: {
911
flexDirection: 'row',
@@ -28,6 +30,7 @@ export default function (theme: Theme = {}) {
2830
...appStyle.arrowStyle
2931
},
3032
arrowImage: {
33+
...flipStyle,
3134
tintColor: appStyle.arrowColor,
3235
...Platform.select({
3336
web: {
@@ -37,6 +40,7 @@ export default function (theme: Theme = {}) {
3740
})
3841
},
3942
disabledArrowImage: {
43+
...flipStyle,
4044
tintColor: appStyle.disabledArrowColor
4145
},
4246
// @ts-expect-error

0 commit comments

Comments
 (0)