From 8ab12e379e450befa3da63e6733a8d717159d60f Mon Sep 17 00:00:00 2001 From: Sadaqat Ali Date: Wed, 5 Jan 2022 20:34:18 +0500 Subject: [PATCH] reversed user info and avatar in RTL layout --- src/components/sideMenu/view/sideMenuStyles.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/sideMenu/view/sideMenuStyles.js b/src/components/sideMenu/view/sideMenuStyles.js index 5f63e06c0..eb5498bf0 100644 --- a/src/components/sideMenu/view/sideMenuStyles.js +++ b/src/components/sideMenu/view/sideMenuStyles.js @@ -1,4 +1,5 @@ import EStyleSheet from 'react-native-extended-stylesheet'; +import { NativeModules } from 'react-native'; import scalePx from '../../../utils/scalePx'; export default EStyleSheet.create({ @@ -18,14 +19,16 @@ export default EStyleSheet.create({ headerContentWrapper: { alignItems: 'center', height: 70, - flexDirection: 'row', + flexDirection: NativeModules.I18nManager.isRTL ? 'row-reverse' : 'row', alignSelf: 'center', + flex: 1, }, contentView: { flex: 4, }, userAvatar: { - marginLeft: 32, + marginLeft: NativeModules.I18nManager.isRTL ? 15 : 32, + marginRight: NativeModules.I18nManager.isRTL ? 15 : 0, }, otherUserAvatar: { borderWidth: 0.1, @@ -36,7 +39,6 @@ export default EStyleSheet.create({ userInfoWrapper: { alignSelf: 'center', marginLeft: 15, - marginRight: 8, width: 120, }, username: {