mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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 <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/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
This commit is contained in:
committed by
Facebook GitHub Bot
parent
4ae2de211e
commit
fa69356742
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user