You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ParticipantsPaneButton.tsx 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import React from 'react';
  2. import { View, ViewStyle } from 'react-native';
  3. import { connect } from 'react-redux';
  4. import { translate } from '../../../base/i18n/functions';
  5. import { IconUsers } from '../../../base/icons/svg';
  6. import AbstractButton, { IProps as AbstractButtonProps } from '../../../base/toolbox/components/AbstractButton';
  7. import { navigate }
  8. from '../../../mobile/navigation/components/conference/ConferenceNavigationContainerRef';
  9. import { screen } from '../../../mobile/navigation/routes';
  10. import ParticipantsCounter from './ParticipantsConter';
  11. import styles from './styles';
  12. /**
  13. * Implements an {@link AbstractButton} to open the participants panel.
  14. */
  15. class ParticipantsPaneButton extends AbstractButton<AbstractButtonProps> {
  16. accessibilityLabel = 'toolbar.accessibilityLabel.participants';
  17. icon = IconUsers;
  18. label = 'toolbar.participants';
  19. /**
  20. * Handles clicking / pressing the button, and opens the participants panel.
  21. *
  22. * @private
  23. * @returns {void}
  24. */
  25. _handleClick() {
  26. return navigate(screen.conference.participants);
  27. }
  28. /**
  29. * Overrides AbstractButton's {@link Component#render()}.
  30. *
  31. * @override
  32. * @protected
  33. * @returns {React$Node}
  34. */
  35. render() {
  36. return (
  37. <View style = { styles.participantsButtonBadge as ViewStyle }>
  38. {super.render()}
  39. <ParticipantsCounter />
  40. </View>
  41. );
  42. }
  43. }
  44. export default translate(connect()(ParticipantsPaneButton));