選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

Labels.js 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. import React, { Component } from 'react';
  2. import { TouchableOpacity, View } from 'react-native';
  3. import { TranscribingLabel } from '../../../transcribing';
  4. import { VideoQualityLabel } from '../../../video-quality';
  5. import { LABEL_ID_INSECURE_ROOM_NAME, LABEL_ID_QUALITY, LABEL_ID_TRANSCRIBING, LabelHitSlop } from './constants';
  6. import styles from './styles';
  7. import { InsecureRoomNameLabel } from './';
  8. type Props = {
  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<Props> {
  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 }>
  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;