Files
jitsi-meet/react/features/base/toolbox/components/AbstractHangupButton.js
Lyubo Marinov 3aff4967f1 Keep buttons in their associated features
Contributing all buttons in one place goes against the designs that we
set out at the beginning of the project's rewrite and that multiple of
us have been following since then.
2018-05-15 14:12:38 -05:00

36 lines
750 B
JavaScript

// @flow
import AbstractButton from './AbstractButton';
import type { Props } from './AbstractButton';
/**
* An abstract implementation of a button for disconnecting a conference.
*/
export default class AbstractHangupButton<P : Props, S: *>
extends AbstractButton<P, S> {
accessibilityLabel = 'Hangup';
iconName = 'icon-hangup';
/**
* Handles clicking / pressing the button, and disconnects the conference.
*
* @private
* @returns {void}
*/
_handleClick() {
this._doHangup();
}
/**
* Helper function to perform the actual hangup action.
*
* @abstract
* @private
* @returns {void}
*/
_doHangup() {
// To be implemented by subclass.
}
}