-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Expand file tree
/
Copy pathindex.js
More file actions
111 lines (105 loc) · 3.27 KB
/
index.js
File metadata and controls
111 lines (105 loc) · 3.27 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
import React, { useRef } from 'react';
import { HeaderStandard } from '@metamask/design-system-react-native';
import { View, StyleSheet, Platform } from 'react-native';
import { strings } from '../../../../locales/i18n';
import { useTheme } from '../../../util/theme';
import BottomSheet from '../../../component-library/components/BottomSheets/BottomSheet';
import Text, {
TextVariant,
TextColor,
} from '../../../component-library/components/Texts/Text';
import Button, {
ButtonVariants,
ButtonWidthTypes,
ButtonSize,
} from '../../../component-library/components/Buttons/Button';
import { useNavigation } from '@react-navigation/native';
const createStyles = (colors) =>
StyleSheet.create({
modalContainer: {
flexDirection: 'column',
},
explanationText: {
marginTop: 16,
},
list: {
marginTop: 24,
},
listItem: {
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'flex-start',
},
bullet: {
marginRight: 12,
},
listContainer: {
marginLeft: 12,
},
buttonContainer: {
paddingTop: 24,
paddingHorizontal: 16,
paddingBottom: Platform.OS === 'android' ? 0 : 16,
width: '100%',
},
contentContainer: {
paddingHorizontal: 16,
},
});
const SeedphraseModal = () => {
const { colors } = useTheme();
const styles = createStyles(colors);
const bottomSheetRef = useRef(null);
const navigation = useNavigation();
const seedPhrasePoints = [
strings('account_backup_step_1.seedPhrase_point_1'),
strings('account_backup_step_1.seedPhrase_point_2'),
strings('account_backup_step_1.seedPhrase_point_3'),
];
const hideWhatIsSeedphrase = () => {
navigation.goBack();
};
return (
<BottomSheet ref={bottomSheetRef}>
<View style={styles.modalContainer}>
<HeaderStandard
title={strings('account_backup_step_1.what_is_seedphrase_title')}
onClose={hideWhatIsSeedphrase}
/>
<View style={styles.contentContainer}>
<Text variant={TextVariant.BodyMD} color={TextColor.Alternative}>
{strings('account_backup_step_1.what_is_seedphrase_text_1')}
</Text>
<View style={styles.list}>
<Text variant={TextVariant.BodyMD} color={TextColor.Alternative}>
{strings('account_backup_step_1.what_is_seedphrase_text_4')}
</Text>
<View style={styles.listContainer}>
{seedPhrasePoints.map((point) => (
<View style={styles.listItem} key={point}>
<Text style={styles.bullet}>{'\u2022'}</Text>
<Text
variant={TextVariant.BodyMD}
color={TextColor.Alternative}
>
{point}
</Text>
</View>
))}
</View>
</View>
</View>
<View style={styles.buttonContainer}>
<Button
variant={ButtonVariants.Secondary}
width={ButtonWidthTypes.Full}
size={ButtonSize.Lg}
onPress={hideWhatIsSeedphrase}
label={strings('account_backup_step_1.what_is_seedphrase_confirm')}
/>
</View>
</View>
</BottomSheet>
);
};
export default SeedphraseModal;