forked from bitcoinvault/GoldWallet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCreateWalletSuccessScreen.tsx
63 lines (55 loc) · 1.73 KB
/
CreateWalletSuccessScreen.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
import React from 'react';
import { StyleSheet, View } from 'react-native';
import { NavigationInjectedProps, NavigationScreenProps } from 'react-navigation';
import { Button, Header, ScreenTemplate, Text, Chip } from 'app/components';
import { palette, typography } from 'app/styles';
const i18n = require('../../loc');
interface Props extends NavigationInjectedProps {
secret: string[];
}
export class CreateWalletSuccessScreen extends React.PureComponent<Props> {
static navigationOptions = (props: NavigationScreenProps) => ({
header: <Header navigation={props.navigation} title={i18n.wallets.add.title} />,
});
navigateBack = () => this.props.navigation.goBack();
render() {
return (
<ScreenTemplate
footer={
<>
<Button onPress={this.navigateBack} title={i18n.wallets.addSuccess.okButton} />
</>
}
>
<Text style={styles.subtitle}>{i18n.wallets.addSuccess.subtitle}</Text>
<Text style={styles.description}>{i18n.wallets.addSuccess.description}</Text>
<View style={styles.mnemonicPhraseContainer}>
{this.props.secret.map((secret, index) => (
<Chip key={index.toString()} label={`${index + 1}. ${secret}`} />
))}
</View>
</ScreenTemplate>
);
}
}
export default CreateWalletSuccessScreen;
const styles = StyleSheet.create({
subtitle: {
marginTop: 12,
marginBottom: 18,
...typography.headline4,
textAlign: 'center',
},
description: {
marginBottom: 52,
color: palette.textGrey,
...typography.caption,
textAlign: 'center',
},
mnemonicPhraseContainer: {
flexDirection: 'row',
flexWrap: 'wrap',
justifyContent: 'center',
paddingHorizontal: 12,
},
});