Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

Labels.tsx 1.6KB

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