您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

OverflowMenuButton.js 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // @flow
  2. import { connect } from 'react-redux';
  3. import { openDialog } from '../../../base/dialog';
  4. import { translate } from '../../../base/i18n';
  5. import { AbstractButton } from '../../../base/toolbox';
  6. import type { AbstractButtonProps } from '../../../base/toolbox';
  7. import OverflowMenu from './OverflowMenu';
  8. /**
  9. * The type of the React {@code Component} props of {@link OverflowMenuButton}.
  10. */
  11. type Props = AbstractButtonProps & {
  12. /**
  13. * The redux {@code dispatch} function.
  14. */
  15. dispatch: Function
  16. };
  17. /**
  18. * An implementation of a button for showing the {@code OverflowMenu}.
  19. */
  20. class OverflowMenuButton extends AbstractButton<Props, *> {
  21. accessibilityLabel = 'toolbar.accessibilityLabel.moreActions';
  22. iconName = 'icon-thumb-menu';
  23. label = 'toolbar.moreActions';
  24. /**
  25. * Handles clicking / pressing this {@code OverflowMenuButton}.
  26. *
  27. * @protected
  28. * @returns {void}
  29. */
  30. _handleClick() {
  31. this.props.dispatch(openDialog(OverflowMenu));
  32. }
  33. }
  34. export default translate(connect()(OverflowMenuButton));