mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 19:32:27 +00:00
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.
36 lines
750 B
JavaScript
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.
|
|
}
|
|
}
|