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