jiti-meet/react/features/conference/components/native/Labels.js

66 lines
2.0 KiB
JavaScript
Raw Normal View History

2018-06-14 11:14:17 +00:00
// @flow
import React, { Component } from 'react';
2018-09-11 10:16:01 +00:00
import { TouchableOpacity, View } from 'react-native';
2018-06-14 11:14:17 +00:00
import { TranscribingLabel } from '../../../transcribing';
import { VideoQualityLabel } from '../../../video-quality';
2020-05-18 12:07:09 +00:00
import { LabelHitSlop, LABEL_ID_INSECURE_ROOM_NAME, LABEL_ID_QUALITY, LABEL_ID_TRANSCRIBING } from './constants';
2018-06-14 11:14:17 +00:00
import styles from './styles';
import { InsecureRoomNameLabel } from './';
type Props = {
2018-09-11 10:16:01 +00:00
/**
* Creates a function to be invoked when the onPress of the touchables are
* triggered.
2018-09-11 10:16:01 +00:00
*/
createOnPress: Function
2018-09-11 10:16:01 +00:00
}
2018-06-14 11:14:17 +00:00
/**
* A container that renders the conference indicators, if any.
*/
class Labels extends Component<Props> {
2018-09-11 10:16:01 +00:00
2018-06-14 11:14:17 +00:00
/**
* Implements React {@code Component}'s render.
*
* @inheritdoc
*/
render() {
return (
<View pointerEvents = 'box-none'>
<View
pointerEvents = 'box-none'
style = { styles.indicatorContainer }>
<TouchableOpacity
hitSlop = { LabelHitSlop }
onPress = {
this.props.createOnPress(LABEL_ID_TRANSCRIBING)
} >
<TranscribingLabel />
</TouchableOpacity>
<TouchableOpacity
hitSlop = { LabelHitSlop }
onPress = {
this.props.createOnPress(LABEL_ID_INSECURE_ROOM_NAME)
} >
<InsecureRoomNameLabel />
</TouchableOpacity>
<TouchableOpacity
hitSlop = { LabelHitSlop }
onPress = {
this.props.createOnPress(LABEL_ID_QUALITY) } >
<VideoQualityLabel />
</TouchableOpacity>
2018-09-11 10:16:01 +00:00
</View>
</View>
2018-06-14 11:14:17 +00:00
);
}
}
export default Labels;