You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

InfoDialogButton.js 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // @flow
  2. import type { Dispatch } from 'redux';
  3. import { translate } from '../../../../base/i18n';
  4. import { IconInfo } from '../../../../base/icons';
  5. import { connect } from '../../../../base/redux';
  6. import { AbstractButton } from '../../../../base/toolbox';
  7. import type { AbstractButtonProps } from '../../../../base/toolbox';
  8. import { beginShareRoom } from '../../../../share-room';
  9. type Props = AbstractButtonProps & {
  10. /**
  11. * The Redux dispatch function.
  12. */
  13. dispatch: Dispatch<any>
  14. };
  15. /**
  16. * Implements an {@link AbstractButton} to open the info dialog of the meeting.
  17. */
  18. class InfoDialogButton extends AbstractButton<Props, *> {
  19. accessibilityLabel = 'info.accessibilityLabel';
  20. icon = IconInfo;
  21. label = 'info.label';
  22. /**
  23. * Handles clicking / pressing the button, and opens the appropriate dialog.
  24. *
  25. * @private
  26. * @returns {void}
  27. */
  28. _handleClick() {
  29. this.props.dispatch(beginShareRoom());
  30. }
  31. }
  32. export default translate(connect()(InfoDialogButton));