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