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

LogoutDialog.js 1022B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // @flow
  2. import React from 'react';
  3. import { Dialog } from '../../../base/dialog';
  4. import { translate } from '../../../base/i18n';
  5. import { connect } from '../../../base/redux';
  6. /**
  7. * The type of {@link LogoutDialog}'s React {@code Component} props.
  8. */
  9. type Props = {
  10. /**
  11. * Logout handler.
  12. */
  13. onLogout: Function,
  14. /**
  15. * Function to be used to translate i18n labels.
  16. */
  17. t: Function
  18. };
  19. /**
  20. * Implements the Logout dialog.
  21. *
  22. * @param {Object} props - The props of the component.
  23. * @returns {React$Element}.
  24. */
  25. function LogoutDialog(props: Props) {
  26. const { onLogout, t } = props;
  27. return (
  28. <Dialog
  29. hideCancelButton = { false }
  30. okKey = { t('dialog.Yes') }
  31. onSubmit = { onLogout }
  32. titleKey = { t('dialog.logoutTitle') }
  33. width = { 'small' }>
  34. <div>
  35. { t('dialog.logoutQuestion') }
  36. </div>
  37. </Dialog>
  38. );
  39. }
  40. export default translate(connect()(LogoutDialog));