forked from reggie3/react-native-webview-leaflet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathButton.js
47 lines (46 loc) · 1.13 KB
/
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
38
39
40
41
42
43
44
45
46
47
import { View, TouchableHighlight, Text } from 'react-native';
import React, { Component } from 'react';
export default (Button = (props) => {
return (
<TouchableHighlight
onPress={props.onPress}
style={{
backgroundColor: props.color ||'lightblue',
borderRadius: 4,
borderColor: props.borderColor || 'rgb(200,200,200)',
borderWidth: props.borderWidth || 1,
margin: 0,
width: props.width || 50,
height: props.height || 50,
elevation: 2
}}
elevation={5}
underlayColor={props.underlayColor || '#e5efff'}
>
<View
elevation={5}
style={{
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
flex: 1,
shadowColor: '#000000',
shadowOffset: {
width: 0,
height: 3
},
shadowRadius: 5,
shadowOpacity: 1.0
}}
>
<Text
style={{
fontSize: props.fontSize || 22
}}
>
{props.text}
</Text>
</View>
</TouchableHighlight>
);
});