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

CallingDialog.js 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. // @flow
  2. import React from 'react';
  3. import { Avatar } from '../../../base/avatar';
  4. import { translate } from '../../../base/i18n';
  5. import { Icon, IconClose } from '../../../base/icons';
  6. import Label from '../Label';
  7. type Props = {
  8. /**
  9. * The phone number that is being called.
  10. */
  11. number: string,
  12. /**
  13. * Closes the dialog.
  14. */
  15. onClose: Function,
  16. /**
  17. * Handler used on hangup click.
  18. */
  19. onHangup: Function,
  20. /**
  21. * The status of the call.
  22. */
  23. status: string,
  24. /**
  25. * Used for translation.
  26. */
  27. t: Function,
  28. };
  29. /**
  30. * Dialog displayed when the user gets called by the meeting.
  31. *
  32. * @param {Props} props - The props of the component.
  33. * @returns {ReactElement}
  34. */
  35. function CallingDialog(props: Props) {
  36. const { number, onClose, status, t } = props;
  37. return (
  38. <div className = 'prejoin-dialog-calling'>
  39. <div className = 'prejoin-dialog-calling-header'>
  40. <Icon
  41. className = 'prejoin-dialog-icon'
  42. onClick = { onClose }
  43. role = 'button'
  44. size = { 24 }
  45. src = { IconClose } />
  46. </div>
  47. <Label className = 'prejoin-dialog-calling-label'>
  48. {t(status)}
  49. </Label>
  50. <Avatar size = { 72 } />
  51. <div className = 'prejoin-dialog-calling-number'>{number}</div>
  52. </div>
  53. );
  54. }
  55. export default translate(CallingDialog);