We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 13214a7 commit d7c107dCopy full SHA for d7c107d
1 file changed
package/src/utils/rtlMirrorSwitchStyle.ts
@@ -1,8 +1,11 @@
1
-import { I18nManager, ViewStyle } from 'react-native';
+import { I18nManager, Platform, ViewStyle } from 'react-native';
2
3
-/** Mirrors Switch horizontally in RTL so thumb/track match layout direction. */
+/** Mirrors Switch horizontally in RTL on iOS so thumb/track match layout direction. */
4
export function getRtlMirrorSwitchStyle(): Pick<ViewStyle, 'transform'> {
5
+ if (Platform.OS !== 'ios' || !I18nManager.isRTL) {
6
+ return {};
7
+ }
8
return {
- transform: [{ scaleX: I18nManager.isRTL ? -1 : 1 }],
9
+ transform: [{ scaleX: -1 }],
10
};
11
}
0 commit comments