You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Labels.tsx 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. import React, { Component } from 'react';
  2. import { TouchableOpacity, View, ViewStyle } from 'react-native';
  3. import TranscribingLabel from '../../../transcribing/components/TranscribingLabel.native';
  4. import VideoQualityLabel from '../../../video-quality/components/VideoQualityLabel.native';
  5. import InsecureRoomNameLabel from './InsecureRoomNameLabel';
  6. import { LABEL_ID_INSECURE_ROOM_NAME, LABEL_ID_QUALITY, LABEL_ID_TRANSCRIBING, LabelHitSlop } from './constants';
  7. import styles from './styles';
  8. interface IProps {
  9. /**
  10. * Creates a function to be invoked when the onPress of the touchables are
  11. * triggered.
  12. */
  13. createOnPress: Function;
  14. }
  15. /**
  16. * A container that renders the conference indicators, if any.
  17. */
  18. class Labels extends Component<IProps> {
  19. /**
  20. * Implements React {@code Component}'s render.
  21. *
  22. * @inheritdoc
  23. */
  24. render() {
  25. return (
  26. <View pointerEvents = 'box-none'>
  27. <View
  28. pointerEvents = 'box-none'
  29. style = { styles.indicatorContainer as ViewStyle }>
  30. <TouchableOpacity
  31. hitSlop = { LabelHitSlop }
  32. onPress = {
  33. this.props.createOnPress(LABEL_ID_TRANSCRIBING)
  34. } >
  35. <TranscribingLabel />
  36. </TouchableOpacity>
  37. <TouchableOpacity
  38. hitSlop = { LabelHitSlop }
  39. onPress = {
  40. this.props.createOnPress(LABEL_ID_INSECURE_ROOM_NAME)
  41. } >
  42. <InsecureRoomNameLabel />
  43. </TouchableOpacity>
  44. <TouchableOpacity
  45. hitSlop = { LabelHitSlop }
  46. onPress = {
  47. this.props.createOnPress(LABEL_ID_QUALITY) } >
  48. <VideoQualityLabel />
  49. </TouchableOpacity>
  50. </View>
  51. </View>
  52. );
  53. }
  54. }
  55. export default Labels;