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.

InviteButton.js 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // @flow
  2. import type { Dispatch } from 'redux';
  3. import { translate } from '../../../../base/i18n';
  4. import { IconAddPeople } from '../../../../base/icons';
  5. import { connect } from '../../../../base/redux';
  6. import { AbstractButton } from '../../../../base/toolbox';
  7. import type { AbstractButtonProps } from '../../../../base/toolbox';
  8. import { doInvitePeople } from '../../../actions.native';
  9. type Props = AbstractButtonProps & {
  10. /**
  11. * The Redux dispatch function.
  12. */
  13. dispatch: Dispatch<any>
  14. };
  15. /**
  16. * Implements an {@link AbstractButton} to enter add/invite people to the
  17. * current call/conference/meeting.
  18. */
  19. class InviteButton extends AbstractButton<Props, *> {
  20. accessibilityLabel = 'toolbar.accessibilityLabel.shareRoom';
  21. icon = IconAddPeople;
  22. label = 'toolbar.shareRoom';
  23. /**
  24. * Handles clicking / pressing the button, and opens the appropriate dialog.
  25. *
  26. * @private
  27. * @returns {void}
  28. */
  29. _handleClick() {
  30. this.props.dispatch(doInvitePeople());
  31. }
  32. }
  33. export default translate(connect()(InviteButton));