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.

ParticipantsPanelButton.js 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // @flow
  2. import type { Dispatch } from 'redux';
  3. import { translate } from '../../../base/i18n';
  4. import { IconParticipants } from '../../../base/icons';
  5. import { connect } from '../../../base/redux';
  6. import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
  7. type Props = AbstractButtonProps & {
  8. /**
  9. * The redux {@code dispatch} function.
  10. */
  11. dispatch: Dispatch<any>
  12. };
  13. /**
  14. * Implements an {@link AbstractButton} to open the participants panel.
  15. */
  16. class ParticipantsPanelButton extends AbstractButton<Props, *> {
  17. accessibilityLabel = 'toolbar.accessibilityLabel.participants';
  18. icon = IconParticipants;
  19. label = 'toolbar.participants';
  20. /**
  21. * Handles clicking / pressing the button, and opens the participants panel.
  22. *
  23. * @private
  24. * @returns {void}
  25. */
  26. }
  27. /**
  28. * Maps part of the redux state to the component's props.
  29. *
  30. * @param {Object} state - The redux store/state.
  31. * @returns {Props}
  32. */
  33. function mapStateToProps(state: Object) {
  34. return {
  35. state
  36. };
  37. }
  38. export default translate(connect(mapStateToProps)(ParticipantsPanelButton));