Files
jitsi-meet/react/features/video-menu/components/AbstractKickButton.ts

35 lines
1.1 KiB
TypeScript
Raw Normal View History

import { openDialog } from '../../base/dialog/actions';
import { IconUserDeleted } from '../../base/icons/svg';
import AbstractButton, { IProps as AbstractButtonProps } from '../../base/toolbox/components/AbstractButton';
2019-01-05 17:49:21 +01:00
import { KickRemoteParticipantDialog } from './';
2019-01-05 17:49:21 +01:00
export interface IProps extends AbstractButtonProps {
2019-01-05 17:49:21 +01:00
/**
* The ID of the participant that this button is supposed to kick.
*/
participantID: string;
}
2019-01-05 17:49:21 +01:00
/**
* An abstract remote video menu button which kicks the remote participant.
*/
export default class AbstractKickButton extends AbstractButton<IProps> {
override accessibilityLabel = 'toolbar.accessibilityLabel.kick';
override icon = IconUserDeleted;
override label = 'videothumbnail.kick';
2019-01-05 17:49:21 +01:00
/**
* Handles clicking / pressing the button, and kicks the participant.
*
* @private
* @returns {void}
*/
override _handleClick() {
2019-01-05 17:49:21 +01:00
const { dispatch, participantID } = this.props;
dispatch(openDialog('KickRemoteParticipantDialog', KickRemoteParticipantDialog, { participantID }));
2019-01-05 17:49:21 +01:00
}
}