Fix RTL layout

This commit is contained in:
Brent Vatne
2018-11-27 13:57:12 -08:00
parent 9cc57719bb
commit 710cd28790

View File

@@ -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 (