Files
jitsi-meet/react/features/conference/components/native/Labels.tsx

55 lines
1.6 KiB
TypeScript
Raw Normal View History

import React, { Component } from 'react';
import { TouchableOpacity, View, ViewStyle } from 'react-native';
2018-06-14 13:14:17 +02:00
2023-03-31 14:04:33 +03:00
import VideoQualityLabel from '../../../video-quality/components/VideoQualityLabel.native';
2020-05-18 14:07:09 +02:00
2023-03-31 14:04:33 +03:00
import InsecureRoomNameLabel from './InsecureRoomNameLabel';
import { LABEL_ID_INSECURE_ROOM_NAME, LABEL_ID_QUALITY, LabelHitSlop } from './constants';
2018-06-14 13:14:17 +02:00
import styles from './styles';
interface IProps {
2018-09-11 12:16:01 +02:00
/**
* Creates a function to be invoked when the onPress of the touchables are
* triggered.
2018-09-11 12:16:01 +02:00
*/
createOnPress: Function;
2018-09-11 12:16:01 +02:00
}
2018-06-14 13:14:17 +02:00
/**
* A container that renders the conference indicators, if any.
*/
class Labels extends Component<IProps> {
2018-09-11 12:16:01 +02:00
2018-06-14 13:14:17 +02:00
/**
* Implements React {@code Component}'s render.
*
* @inheritdoc
*/
render() {
return (
<View pointerEvents = 'box-none'>
<View
pointerEvents = 'box-none'
style = { styles.indicatorContainer as ViewStyle }>
<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 12:16:01 +02:00
</View>
</View>
2018-06-14 13:14:17 +02:00
);
}
}
export default Labels;