forked from voximplant/react-native-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
IncomingCallForm.js
49 lines (41 loc) · 1.08 KB
/
IncomingCallForm.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
/*
* 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 { CallButton } from './CallButton';
class IncomingCallForm extends Component {
handleAnswer() {
this.props.answerCall();
}
handleReject() {
this.props.rejectCall();
}
render() {
return (
<View style={{ flex: 1, alignItems:'center', justifyContent:'center' }}>
<Text style={styles.incoming_call}>{this.props.title}</Text>
<View style={{ flexDirection: 'row', justifyContent: 'space-around', height: 90 }}>
<CallButton icon_name='call' color='#0C90E7' buttonPressed={ () => this.handleAnswer() } />
<CallButton icon_name='call-end' color='#FF3B30' buttonPressed={ () => this.handleReject() } />
</View>
</View>
);
}
}
var styles = StyleSheet.create({
incoming_call: {
justifyContent:'center',
alignSelf: 'center',
fontSize: 18,
},
});
export {
IncomingCallForm as IncomingCallForm
}