AddButton.js
965 Bytes
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
import React, { Component } from 'react';
import {
TouchableOpacity,
Text,
StyleSheet,
} from 'react-native';
export default class AddButton extends Component {
constructor(props) {
super(props);
}
static defaultProps = {
onPress: () => null,
}
render() {
return (
<TouchableOpacity
style={styles.button}
onPress={this.props.onPress}
>
<Text style={styles.title}>Register</Text>
</TouchableOpacity>
)
}
}
const styles = StyleSheet.create({
button: {
alignSelf: 'center',
padding: 10,
backgroundColor: "#0066cc",
width: 100,
height: 30,
marginTop: 10,
borderRadius : 20,
justifyContent : 'center',
},
title: {
fontSize: 15,
color: 'white',
textAlign: 'center',
textAlignVertical : 'center',
},
});