-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathadd.js
51 lines (44 loc) · 1002 Bytes
/
add.js
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
// @flow
import React, { Component } from 'react';
import {
StyleSheet,
TouchableOpacity,
View,
} from 'react-native';
import Icon from 'react-native-vector-icons/Ionicons';
import Add from '../containers/add';
import type { Navigation } from '../app';
export default class extends Component {
props: {
navigation: Navigation,
};
onClose = () => {
const { navigation } = this.props;
navigation.goBack();
};
render() {
return (
<View style={styles.container}>
<TouchableOpacity style={styles.button} onPress={this.onClose}>
<Icon
name="md-close"
size={30}
color="#FFFFFF"
/>
</TouchableOpacity>
<Add onAddedCoin={this.onClose} />
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
paddingTop: 20, // put content below status bar
// backgroundColor: 'white',
backgroundColor: '#673AB7',
},
button: {
margin: 10,
},
});