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.

AbstractKickButton.js 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // @flow
  2. import { openDialog } from '../../base/dialog';
  3. import { IconKick } from '../../base/icons';
  4. import { AbstractButton, type AbstractButtonProps } from '../../base/toolbox/components';
  5. import { KickRemoteParticipantDialog } from '.';
  6. export type Props = AbstractButtonProps & {
  7. /**
  8. * The redux {@code dispatch} function.
  9. */
  10. dispatch: Function,
  11. /**
  12. * The ID of the participant that this button is supposed to kick.
  13. */
  14. participantID: string,
  15. /**
  16. * The function to be used to translate i18n labels.
  17. */
  18. t: Function
  19. };
  20. /**
  21. * An abstract remote video menu button which kicks the remote participant.
  22. */
  23. export default class AbstractKickButton extends AbstractButton<Props, *> {
  24. accessibilityLabel = 'toolbar.accessibilityLabel.kick';
  25. icon = IconKick;
  26. label = 'videothumbnail.kick';
  27. /**
  28. * Handles clicking / pressing the button, and kicks the participant.
  29. *
  30. * @private
  31. * @returns {void}
  32. */
  33. _handleClick() {
  34. const { dispatch, participantID } = this.props;
  35. dispatch(openDialog(KickRemoteParticipantDialog, { participantID }));
  36. }
  37. }