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

ParticipantsPaneButton.js 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. import { open } from '../../actions.native';
  8. type Props = AbstractButtonProps & {
  9. /**
  10. * The redux {@code dispatch} function.
  11. */
  12. dispatch: Dispatch<any>
  13. };
  14. /**
  15. * Implements an {@link AbstractButton} to open the participants panel.
  16. */
  17. class ParticipantsPaneButton extends AbstractButton<Props, *> {
  18. accessibilityLabel = 'toolbar.accessibilityLabel.participants';
  19. icon = IconParticipants;
  20. label = 'toolbar.participants';
  21. /**
  22. * Handles clicking / pressing the button, and opens the participants panel.
  23. *
  24. * @private
  25. * @returns {void}
  26. */
  27. _handleClick() {
  28. const { dispatch } = this.props;
  29. dispatch(open());
  30. }
  31. }
  32. export default translate(connect()(ParticipantsPaneButton));