您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

ParticipantsPane.js 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // @flow
  2. import React, { useCallback } from 'react';
  3. import { Button, Text, withTheme } from 'react-native-paper';
  4. import { useDispatch } from 'react-redux';
  5. import { translate } from '../../../base/i18n';
  6. import { JitsiModal } from '../../../base/modal';
  7. import { close } from '../../actions';
  8. /**
  9. * {@code ParticipantsPane}'s React {@code Component} prop types.
  10. */
  11. type Props = {
  12. /**
  13. * Theme used for styles.
  14. */
  15. theme: Object
  16. }
  17. /**
  18. * Participant pane.
  19. *
  20. * @returns {React$Element<any>}
  21. */
  22. function ParticipantsPane({ theme }: Props) {
  23. const dispatch = useDispatch();
  24. const closePane = useCallback(
  25. () => dispatch(close()),
  26. [ dispatch ]);
  27. return (
  28. <JitsiModal
  29. headerProps = {{
  30. onPressBack: closePane()
  31. }}>
  32. {/* eslint-disable-next-line react/jsx-no-bind */}
  33. <Button onPress = { closePane }> X</Button>
  34. <Text>
  35. OLE
  36. </Text>
  37. </JitsiModal>
  38. );
  39. }
  40. export default translate(withTheme(ParticipantsPane));