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.

ParticipantsPane.js 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. // @flow
  2. import React, { useCallback } from 'react';
  3. import { Button, withTheme } from 'react-native-paper';
  4. import { useDispatch } from 'react-redux';
  5. import { translate } from '../../../base/i18n';
  6. import { Icon, IconClose } from '../../../base/icons';
  7. import { JitsiModal } from '../../../base/modal';
  8. import { close } from '../../actions';
  9. import styles from './styles';
  10. /**
  11. * {@code ParticipantsPane}'s React {@code Component} prop types.
  12. */
  13. type Props = {
  14. /**
  15. * Theme used for styles.
  16. */
  17. theme: Object
  18. }
  19. /**
  20. * Participant pane.
  21. *
  22. * @returns {React$Element<any>}
  23. */
  24. function ParticipantsPane({ theme }: Props) {
  25. const dispatch = useDispatch();
  26. const closePane = useCallback(
  27. () => dispatch(close()),
  28. [ dispatch ]);
  29. const { palette } = theme;
  30. return (
  31. <JitsiModal
  32. showHeaderWithNavigation = { false }
  33. style = { styles.participantsPane }>
  34. <Button
  35. mode = 'contained'
  36. onPress = { closePane }
  37. style = { styles.closeButton }
  38. theme = {{
  39. colors: {
  40. primary: palette.action02
  41. }
  42. }}>
  43. <Icon
  44. src = { IconClose }
  45. style = { styles.closeIcon } />
  46. </Button>
  47. </JitsiModal>
  48. );
  49. }
  50. export default translate(withTheme(ParticipantsPane));