jiti-meet/react/features/invite/components/info-dialog/native/InfoDialogButton.js

40 lines
1.0 KiB
JavaScript
Raw Normal View History

2019-04-02 13:16:52 +00:00
// @flow
import type { Dispatch } from 'redux';
import { translate } from '../../../../base/i18n';
2019-08-30 16:39:06 +00:00
import { IconInfo } from '../../../../base/icons';
2019-04-02 13:16:52 +00:00
import { connect } from '../../../../base/redux';
import { AbstractButton } from '../../../../base/toolbox';
import type { AbstractButtonProps } from '../../../../base/toolbox';
import { beginShareRoom } from '../../../../share-room';
type Props = AbstractButtonProps & {
/**
* The Redux dispatch function.
*/
dispatch: Dispatch<any>
};
/**
* Implements an {@link AbstractButton} to open the info dialog of the meeting.
*/
class InfoDialogButton extends AbstractButton<Props, *> {
accessibilityLabel = 'info.accessibilityLabel';
2019-08-30 16:39:06 +00:00
icon = IconInfo;
2019-04-02 13:16:52 +00:00
label = 'info.label';
/**
* Handles clicking / pressing the button, and opens the appropriate dialog.
*
* @private
* @returns {void}
*/
_handleClick() {
this.props.dispatch(beginShareRoom());
}
}
export default translate(connect()(InfoDialogButton));