Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

AlwaysOnLabels.js 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // @flow
  2. import React from 'react';
  3. import { TouchableOpacity } from 'react-native';
  4. import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet';
  5. import { RecordingLabel } from '../../../recording';
  6. import RaisedHandsCountLabel from './RaisedHandsCountLabel';
  7. import {
  8. LabelHitSlop,
  9. LABEL_ID_RAISED_HANDS_COUNT,
  10. LABEL_ID_RECORDING,
  11. LABEL_ID_STREAMING
  12. } from './constants';
  13. type Props = {
  14. /**
  15. * Creates a function to be invoked when the onPress of the touchables are
  16. * triggered.
  17. */
  18. createOnPress: Function
  19. }
  20. const AlwaysOnLabels = ({ createOnPress }: Props) => (<>
  21. <TouchableOpacity
  22. hitSlop = { LabelHitSlop }
  23. onPress = { createOnPress(LABEL_ID_RECORDING) } >
  24. <RecordingLabel mode = { JitsiRecordingConstants.mode.FILE } />
  25. </TouchableOpacity>
  26. <TouchableOpacity
  27. hitSlop = { LabelHitSlop }
  28. onPress = { createOnPress(LABEL_ID_STREAMING) } >
  29. <RecordingLabel mode = { JitsiRecordingConstants.mode.STREAM } />
  30. </TouchableOpacity>
  31. <TouchableOpacity
  32. hitSlop = { LabelHitSlop }
  33. onPress = { createOnPress(LABEL_ID_RAISED_HANDS_COUNT) } >
  34. <RaisedHandsCountLabel />
  35. </TouchableOpacity>
  36. </>);
  37. export default AlwaysOnLabels;