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.ts 1.0KB

12345678910111213141516171819202122232425262728293031323334
  1. import { openDialog } from '../../base/dialog/actions';
  2. import { IconUserDeleted } from '../../base/icons/svg';
  3. import AbstractButton, { IProps as AbstractButtonProps } from '../../base/toolbox/components/AbstractButton';
  4. import { KickRemoteParticipantDialog } from './';
  5. export interface IProps extends AbstractButtonProps {
  6. /**
  7. * The ID of the participant that this button is supposed to kick.
  8. */
  9. participantID: string;
  10. }
  11. /**
  12. * An abstract remote video menu button which kicks the remote participant.
  13. */
  14. export default class AbstractKickButton extends AbstractButton<IProps> {
  15. accessibilityLabel = 'toolbar.accessibilityLabel.kick';
  16. icon = IconUserDeleted;
  17. label = 'videothumbnail.kick';
  18. /**
  19. * Handles clicking / pressing the button, and kicks the participant.
  20. *
  21. * @private
  22. * @returns {void}
  23. */
  24. _handleClick() {
  25. const { dispatch, participantID } = this.props;
  26. dispatch(openDialog(KickRemoteParticipantDialog, { participantID }));
  27. }
  28. }