forked from BlueWallet/BlueWallet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
WalletToImport.tsx
64 lines (58 loc) · 1.62 KB
/
WalletToImport.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import React from 'react';
import { Text } from 'react-native-elements';
import { I18nManager, StyleSheet, TouchableOpacity, View } from 'react-native';
import { useTheme } from './themes';
interface WalletToImportProp {
title: string;
subtitle: string;
active: boolean;
onPress: () => void;
}
const WalletToImport: React.FC<WalletToImportProp> = ({ title, subtitle, active, onPress }) => {
const { colors } = useTheme();
const stylesHooks = StyleSheet.create({
root: {
borderColor: active ? colors.newBlue : colors.buttonDisabledBackgroundColor,
backgroundColor: colors.buttonDisabledBackgroundColor,
},
title: {
color: colors.newBlue,
writingDirection: I18nManager.isRTL ? 'rtl' : 'ltr',
},
subtitle: {
color: colors.alternativeTextColor,
writingDirection: I18nManager.isRTL ? 'rtl' : 'ltr',
},
});
return (
<TouchableOpacity accessibilityRole="button" onPress={onPress}>
<View style={[styles.root, stylesHooks.root]}>
<Text style={[styles.title, stylesHooks.title]}>{title}</Text>
<Text style={[styles.subtitle, stylesHooks.subtitle]}>{subtitle}</Text>
</View>
</TouchableOpacity>
);
};
const styles = StyleSheet.create({
root: {
alignItems: 'stretch',
borderRadius: 8,
borderWidth: 1.5,
flexDirection: 'column',
justifyContent: 'center',
marginBottom: 8,
minWidth: '100%',
paddingHorizontal: 16,
paddingVertical: 10,
},
title: {
fontWeight: 'bold',
fontSize: 15,
paddingBottom: 3,
},
subtitle: {
fontSize: 13,
fontWeight: '500',
},
});
export default WalletToImport;