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