-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathButton.js
37 lines (34 loc) · 849 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
import React from 'react';
import { Text, TouchableOpacity } from 'react-native';
const Button = ({ onPressed, text }) => {
const { buttonStyle, textStyle } = styles;
return (
<TouchableOpacity onPress={onPressed} style={buttonStyle}>
<Text style={textStyle}>
{text}
</Text>
</TouchableOpacity>
);
};
const styles = {
textStyle: {
alignSelf: 'center',
fontSize: 16,
fontWeight: '600',
color: '#007aff',
paddingTop: 10,
paddingBottom: 10,
},
buttonStyle: {
flex: 1,
width: null,
alignSelf: 'stretch',
backgroundColor: '#fff',
borderRadius: 5,
borderWidth: 1,
borderColor: '#007aff',
marginLeft: 5,
marginRight: 5,
},
};
export default Button;