1 | import { View, TouchableHighlight, Text } from 'react-native';
|
2 | import React, { Component } from 'react';
|
3 |
|
4 | export default (Button = (props) => {
|
5 | return (
|
6 | <TouchableHighlight
|
7 | onPress={props.onPress}
|
8 | style={{
|
9 | backgroundColor: props.color ||'lightblue',
|
10 | borderRadius: 4,
|
11 | borderColor: props.borderColor || 'rgb(200,200,200)',
|
12 | borderWidth: props.borderWidth || 1,
|
13 | margin: 0,
|
14 | width: props.width || 50,
|
15 | height: props.height || 50,
|
16 | elevation: 2
|
17 | }}
|
18 | elevation={5}
|
19 | underlayColor={props.underlayColor || '#e5efff'}
|
20 | >
|
21 | <View
|
22 | elevation={5}
|
23 | style={{
|
24 | display: 'flex',
|
25 | justifyContent: 'center',
|
26 | alignItems: 'center',
|
27 | flex: 1,
|
28 | shadowColor: '#000000',
|
29 | shadowOffset: {
|
30 | width: 0,
|
31 | height: 3
|
32 | },
|
33 | shadowRadius: 5,
|
34 | shadowOpacity: 1.0
|
35 | }}
|
36 | >
|
37 | <Text
|
38 | style={{
|
39 | fontSize: props.fontSize || 22
|
40 | }}
|
41 | >
|
42 | {props.text}
|
43 | </Text>
|
44 | </View>
|
45 | </TouchableHighlight>
|
46 | );
|
47 | });
|