mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-10 09:13:43 +08:00
support RTL
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
// that could be found when using the drawer component
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import { Animated, StyleSheet, View, Keyboard, StatusBar } from 'react-native';
|
||||
import { Animated, StyleSheet, View, Keyboard, StatusBar, I18nManager } from 'react-native';
|
||||
import invariant from '../utils/invariant';
|
||||
import { AnimatedEvent } from 'react-native/Libraries/Animated/src/AnimatedEvent';
|
||||
|
||||
@@ -395,7 +395,7 @@ export default class DrawerLayout extends Component<PropType, StateType> {
|
||||
}
|
||||
const drawerStyles = {
|
||||
transform: [{ translateX: drawerTranslateX }],
|
||||
flexDirection: fromLeft ? 'row' : 'row-reverse',
|
||||
flexDirection: (I18nManager.isRTL ? !fromLeft : fromLeft) ? 'row' : 'row-reverse'
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user