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

InviteButton.js 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // @flow
  2. import { createToolbarEvent, sendAnalytics } from '../../../../analytics';
  3. import { translate } from '../../../../base/i18n';
  4. import { IconAddPeople } from '../../../../base/icons';
  5. import { connect } from '../../../../base/redux';
  6. import { AbstractButton, type AbstractButtonProps } from '../../../../base/toolbox/components';
  7. import { beginAddPeople } from '../../../actions.any';
  8. /**
  9. * The type of the React {@code Component} props of {@link EmbedMeetingButton}.
  10. */
  11. type Props = AbstractButtonProps & {
  12. /**
  13. * The redux {@code dispatch} function.
  14. */
  15. dispatch: Function
  16. };
  17. /**
  18. * Implementation of a button for opening invite people dialog.
  19. */
  20. class InviteButton extends AbstractButton<Props, *> {
  21. accessibilityLabel = 'toolbar.accessibilityLabel.invite';
  22. icon = IconAddPeople;
  23. label = 'toolbar.invite';
  24. tooltip = 'toolbar.invite';
  25. /**
  26. * Handles clicking / pressing the button, and opens the appropriate dialog.
  27. *
  28. * @protected
  29. * @returns {void}
  30. */
  31. _handleClick() {
  32. const { dispatch } = this.props;
  33. sendAnalytics(createToolbarEvent('invite'));
  34. dispatch(beginAddPeople());
  35. }
  36. }
  37. export default translate(connect()(InviteButton));