36 lines
738 B
JavaScript
36 lines
738 B
JavaScript
// @flow
|
|
|
|
import { IconHangup } from '../../icons';
|
|
|
|
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> {
|
|
|
|
icon = IconHangup;
|
|
|
|
/**
|
|
* Handles clicking / pressing the button, and disconnects the conference.
|
|
*
|
|
* @protected
|
|
* @returns {void}
|
|
*/
|
|
_handleClick() {
|
|
this._doHangup();
|
|
}
|
|
|
|
/**
|
|
* Helper function to perform the actual hangup action.
|
|
*
|
|
* @protected
|
|
* @returns {void}
|
|
*/
|
|
_doHangup() {
|
|
// To be implemented by subclass.
|
|
}
|
|
}
|