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

CallingDialog.js 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. size = { 24 }
  44. src = { IconClose } />
  45. </div>
  46. <Label className = 'prejoin-dialog-calling-label'>
  47. {t(status)}
  48. </Label>
  49. <Avatar size = { 72 } />
  50. <div className = 'prejoin-dialog-calling-number'>{number}</div>
  51. </div>
  52. );
  53. }
  54. export default translate(CallingDialog);