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

DeclineButton.js 916B

123456789101112131415161718192021222324252627282930313233343536373839
  1. // @flow
  2. import { connect } from 'react-redux';
  3. import { AbstractButton } from '../../../base/toolbox';
  4. import { translate } from '../../../base/i18n';
  5. import type { AbstractButtonProps } from '../../../base/toolbox';
  6. import { incomingCallDeclined } from '../actions';
  7. type Props = AbstractButtonProps & {
  8. /**
  9. * The redux {@code dispatch} function.
  10. */
  11. dispatch: Function
  12. };
  13. /**
  14. * An implementation of a button which rejects an incoming call.
  15. */
  16. class DeclineButton extends AbstractButton<Props, *> {
  17. accessibilityLabel = 'incomingCall.decline';
  18. iconName = 'hangup';
  19. label = 'incomingCall.decline';
  20. /**
  21. * Handles clicking / pressing the button, and declines the incoming call.
  22. *
  23. * @protected
  24. * @returns {void}
  25. */
  26. _handleClick() {
  27. this.props.dispatch(incomingCallDeclined());
  28. }
  29. }
  30. export default translate(connect()(DeclineButton));