This commit is contained in:
marcosrdz 2021-03-18 22:30:01 -04:00
parent 5a82f678f1
commit ece9b99abd
10 changed files with 30 additions and 14 deletions

View file

@ -23,6 +23,7 @@ import {
TouchableWithoutFeedback,
View,
InteractionManager,
I18nManager,
} from 'react-native';
import Clipboard from '@react-native-clipboard/clipboard';
import LinearGradient from 'react-native-linear-gradient';
@ -653,7 +654,7 @@ export const BlueListItem = React.memo(props => {
<ActivityIndicator />
) : (
<>
{props.chevron && <ListItem.Chevron />}
{props.chevron && <ListItem.Chevron iconStyle={{ transform: [{ scaleX: I18nManager.isRTL ? -1 : 1 }] }} />}
{props.rightIcon && <Avatar icon={props.rightIcon} />}
{props.switch && <Switch {...props.switch} accessibilityLabel={props.title} accessible accessibilityRole="switch" />}
{props.checkmark && <ListItem.CheckBox iconType="octaicon" checkedColor="#0070FF" checkedIcon="check" checked />}

View file

@ -4,6 +4,7 @@ import {
ActivityIndicator,
Animated,
Image,
I18nManager,
Platform,
StyleSheet,
Text,
@ -279,6 +280,7 @@ const cStyles = StyleSheet.create({
},
content: {
left: 16,
flexDirection: I18nManager.isRTL ? 'row-reverse' : 'row',
},
});

View file

@ -13,6 +13,7 @@ import {
TouchableOpacity,
TouchableWithoutFeedback,
View,
I18nManager,
} from 'react-native';
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
import { Icon } from 'react-native-elements';
@ -321,7 +322,7 @@ const LNDCreateInvoice = () => {
{!isLoading && (
<TouchableOpacity style={styles.walletChooseWrap} onPress={navigateToSelectWallet}>
<Text style={styles.walletChooseText}>{loc.wallets.select_wallet.toLowerCase()}</Text>
<Icon name="angle-right" size={18} type="font-awesome" color="#9aa0aa" />
<Icon name={I18nManager.isRTL ? 'angle-left' : 'angle-right'} size={18} type="font-awesome" color="#9aa0aa" />
</TouchableOpacity>
)}
<View style={styles.walletNameWrap}>

View file

@ -1,7 +1,7 @@
/* global alert */
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Keyboard, Text, TouchableOpacity, StatusBar, TouchableWithoutFeedback, View, StyleSheet } from 'react-native';
import { Keyboard, Text, TouchableOpacity, StatusBar, TouchableWithoutFeedback, View, StyleSheet, I18nManager } from 'react-native';
import { Icon } from 'react-native-elements';
import { BlueButton, BlueLoading, BlueSpacing, BlueText } from '../../BlueComponents';
@ -121,7 +121,7 @@ export default class AztecoRedeem extends Component {
}
>
<Text style={styles.selectText}>{loc.azteco.redeem}</Text>
<Icon name="angle-right" size={18} type="font-awesome" color="#9aa0aa" />
<Icon name={I18nManager.isRTL ? 'angle-left' : 'angle-right'} size={18} type="font-awesome" color="#9aa0aa" />
</TouchableOpacity>
)}
<View style={styles.selectWallet2}>

View file

@ -4,6 +4,7 @@ import {
Alert,
Dimensions,
FlatList,
I18nManager,
Keyboard,
KeyboardAvoidingView,
LayoutAnimation,
@ -1157,7 +1158,7 @@ const SendDetails = () => {
onPress={() => navigation.navigate('SelectWallet', { onWalletSelect, chainType: Chain.ONCHAIN })}
>
<Text style={styles.selectText}>{loc.wallets.select_wallet.toLowerCase()}</Text>
<Icon name="angle-right" size={18} type="font-awesome" color="#9aa0aa" />
<Icon name={I18nManager.isRTL ? 'angle-left' : 'angle-right'} size={18} type="font-awesome" color="#9aa0aa" />
</TouchableOpacity>
)}
<View style={styles.selectWrap}>

View file

@ -1,6 +1,6 @@
/* global alert */
import React, { useState, useEffect, useCallback } from 'react';
import { View, TextInput, Linking, StyleSheet, Alert } from 'react-native';
import { View, TextInput, Linking, StyleSheet, Alert, I18nManager } from 'react-native';
import { Button } from 'react-native-elements';
import { useTheme, useNavigation, useRoute } from '@react-navigation/native';
import AsyncStorage from '@react-native-async-storage/async-storage';
@ -38,6 +38,7 @@ const styles = StyleSheet.create({
},
buttonStyle: {
backgroundColor: 'transparent',
flexDirection: I18nManager.isRTL ? 'row-reverse' : 'row',
},
});

View file

@ -1,6 +1,6 @@
/* global alert */
import React, { useCallback, useEffect, useState } from 'react';
import { ScrollView, TouchableWithoutFeedback, StyleSheet, Linking, View, TextInput } from 'react-native';
import { ScrollView, TouchableWithoutFeedback, I18nManager, StyleSheet, Linking, View, TextInput } from 'react-native';
import { useTheme } from '@react-navigation/native';
import { Button } from 'react-native-elements';
@ -186,6 +186,7 @@ const styles = StyleSheet.create({
},
buttonStyle: {
backgroundColor: 'transparent',
flexDirection: I18nManager.isRTL ? 'row-reverse' : 'row',
},
});

View file

@ -1,5 +1,5 @@
import React, { useContext, useEffect, useRef, useState } from 'react';
import { View, ActivityIndicator, Text, TouchableOpacity, StyleSheet, StatusBar } from 'react-native';
import { View, ActivityIndicator, Text, TouchableOpacity, StyleSheet, StatusBar, I18nManager } from 'react-native';
import { Icon } from 'react-native-elements';
import { useNavigation, useRoute, useTheme } from '@react-navigation/native';
@ -353,7 +353,7 @@ const TransactionsStatus = () => {
{renderRBFCancel()}
<TouchableOpacity style={styles.details} onPress={navigateToTransactionDetials}>
<Text style={styles.detailsText}>{loc.send.create_details.toLowerCase()}</Text>
<Icon name="angle-right" size={18} type="font-awesome" color="#9aa0aa" />
<Icon name={I18nManager.isRTL ? 'angle-left' : 'angle-right'} size={18} type="font-awesome" color="#9aa0aa" />
</TouchableOpacity>
</View>
</View>

View file

@ -817,6 +817,7 @@ const styles = StyleSheet.create({
helpButtonWrapper: {
alignItems: 'flex-end',
flexDirection: I18nManager.isRTL ? 'row' : 'row-reverse',
},
helpButton: {
paddingHorizontal: 16,

View file

@ -14,6 +14,7 @@ import {
SafeAreaView,
findNodeHandle,
useColorScheme,
I18nManager,
} from 'react-native';
import { BlueHeaderDefaultMain, BlueTransactionListItem } from '../../BlueComponents';
import WalletsCarousel from '../../components/WalletsCarousel';
@ -125,11 +126,18 @@ const WalletsList = () => {
shadowOpacity: 0,
shadowOffset: { height: 0, width: 0 },
},
headerRight: () => (
<TouchableOpacity testID="SettingsButton" style={styles.headerTouch} onPress={navigateToSettings}>
<Icon size={22} name="kebab-horizontal" type="octicon" color={colors.foregroundColor} />
</TouchableOpacity>
),
headerRight: () =>
I18nManager.isRTL ? null : (
<TouchableOpacity testID="SettingsButton" style={styles.headerTouch} onPress={navigateToSettings}>
<Icon size={22} name="kebab-horizontal" type="octicon" color={colors.foregroundColor} />
</TouchableOpacity>
),
headerLeft: () =>
I18nManager.isRTL ? (
<TouchableOpacity testID="SettingsButton" style={styles.headerTouch} onPress={navigateToSettings}>
<Icon size={22} name="kebab-horizontal" type="octicon" color={colors.foregroundColor} />
</TouchableOpacity>
) : null,
});
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [colors]);