forked from voximplant/react-native-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CallButton.js
65 lines (58 loc) · 1.23 KB
/
CallButton.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
* Copyright (c) 2011-2018, Zingaya, Inc. All rights reserved.
*/
'use strict';
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
TouchableOpacity
} from 'react-native';
import Icon from 'react-native-vector-icons/MaterialIcons';
class CallButton extends Component {
handleButtonPressed() {
this.props.buttonPressed();
}
render() {
return (
<TouchableOpacity onPress={ () => this.handleButtonPressed() }>
<View style={ [styles.icon, { borderColor: this.props.color }] }>
<Icon
name={ this.props.icon_name }
color={ this.props.color }
size={ 35 }
backgroundColor='transparent' />
</View>
</TouchableOpacity>
);
}
}
var styles = StyleSheet.create({
icon: {
width: 50,
height: 50,
borderWidth: 1,
borderRadius: 35,
margin: 10,
alignItems: 'center',
justifyContent: 'center',
backgroundColor:'transparent',
},
phone_icon: {
borderColor: '#0C90E7',
marginHorizontal: 10
},
align_left: {
alignSelf: 'flex-start'
},
align_right: {
alignSelf: 'flex-end'
},
align_center: {
alignSelf: 'center'
},
});
export {
CallButton as CallButton
}