From fa69356742e99f1eeb9eae912674ea4941cc16e2 Mon Sep 17 00:00:00 2001 From: Keith Melmon Date: Fri, 24 Apr 2020 13:59:16 -0700 Subject: [PATCH] Use RTL in RTLExample when Platform != android (#28742) Summary: This change upstreams a small change we did in react-native-windows to allow the RTLExample RNTester page to function correctly on Windows. The change is part of this Pr: https://github.com/microsoft/react-native-windows/pull/4683 Currently the direction property is gated behind a check for Platform == 'iOS', which means it only works on iOS. Windows supports direction = 'rtl' so I've chanced this check to Platform != 'android'. ## Changelog [Internal] [Changed] - Changed RTLExample RNTester page to use direction = 'rtl' when Platform is not Android. Pull Request resolved: https://github.com/facebook/react-native/pull/28742 Test Plan: Confirmed this change works correctly in RNTester on Windows. Have not confirmed iOS as I don't have Mac hardware. Differential Revision: D21235579 Pulled By: shergin fbshipit-source-id: 47ab93c2bcd0dbc8347c6746081ae3c64f88faa5 --- RNTester/js/examples/RTL/RTLExample.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RNTester/js/examples/RTL/RTLExample.js b/RNTester/js/examples/RTL/RTLExample.js index 2008ea0ca8a..e19c1bac316 100644 --- a/RNTester/js/examples/RTL/RTLExample.js +++ b/RNTester/js/examples/RTL/RTLExample.js @@ -521,7 +521,7 @@ const BorderExample = withRTLState(({isRTL, setRTL}) => { }); const directionStyle = isRTL => - Platform.OS === 'ios' ? {direction: isRTL ? 'rtl' : 'ltr'} : null; + Platform.OS !== 'android' ? {direction: isRTL ? 'rtl' : 'ltr'} : null; const styles = StyleSheet.create({ container: {