-
Notifications
You must be signed in to change notification settings - Fork 39
/
button.js
37 lines (33 loc) · 777 Bytes
/
button.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
'use strict'
var React = require('react');
var ReactNative = require('react-native');
var { StyleSheet, Text, TouchableOpacity, View } = ReactNative;
var Button = React.createClass({
render: function() {
return (
<TouchableOpacity style={styles.button} onPress={this.props.onPress}>
<Text style={styles.buttonText}>
{this.props.text}
</Text>
</TouchableOpacity>
);
}
});
var styles = StyleSheet.create({
buttonText: {
color: '#0069d5',
alignSelf: 'center',
fontSize: 18
},
button: {
height: 36,
backgroundColor: 'white',
borderColor: 'white',
borderWidth: 1,
borderRadius: 6,
marginBottom: 10,
alignSelf: 'stretch',
justifyContent: 'center'
}
});
module.exports = Button