You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DialOutDialog.js 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. // @flow
  2. import React from 'react';
  3. import { translate } from '../../../base/i18n';
  4. import { Icon, IconClose } from '../../../base/icons';
  5. import { ActionButton } from '../../../base/premeeting';
  6. import Label from '../Label';
  7. import CountryPicker from '../country-picker/CountryPicker';
  8. type Props = {
  9. /**
  10. * Closes a dialog.
  11. */
  12. onClose: Function,
  13. /**
  14. * Submit handler.
  15. */
  16. onSubmit: Function,
  17. /**
  18. * Handler for text button.
  19. */
  20. onTextButtonClick: Function,
  21. /**
  22. * Used for translation.
  23. */
  24. t: Function,
  25. };
  26. /**
  27. * This component displays the dialog from which the user can enter the
  28. * phone number in order to be called by the meeting.
  29. *
  30. * @param {Props} props - The props of the component.
  31. * @returns {React$Element}
  32. */
  33. function DialOutDialog(props: Props) {
  34. const { onClose, onTextButtonClick, onSubmit, t } = props;
  35. return (
  36. <div className = 'prejoin-dialog-callout'>
  37. <div className = 'prejoin-dialog-callout-header'>
  38. <div className = 'prejoin-dialog-title'>
  39. {t('prejoin.startWithPhone')}
  40. </div>
  41. <Icon
  42. className = 'prejoin-dialog-icon'
  43. onClick = { onClose }
  44. role = 'button'
  45. size = { 24 }
  46. src = { IconClose } />
  47. </div>
  48. <Label>{t('prejoin.callMeAtNumber')}</Label>
  49. <div className = 'prejoin-dialog-callout-picker'>
  50. <CountryPicker onSubmit = { onSubmit } />
  51. </div>
  52. <ActionButton
  53. className = 'prejoin-dialog-btn'
  54. onClick = { onSubmit }
  55. type = 'primary'>
  56. {t('prejoin.callMe')}
  57. </ActionButton>
  58. <div className = 'prejoin-dialog-delimiter-container'>
  59. <div className = 'prejoin-dialog-delimiter' />
  60. <div className = 'prejoin-dialog-delimiter-txt-container'>
  61. <span className = 'prejoin-dialog-delimiter-txt'>
  62. {t('prejoin.or')}
  63. </span>
  64. </div>
  65. </div>
  66. <div className = 'prejoin-dialog-dialin-container'>
  67. <ActionButton
  68. className = 'prejoin-dialog-btn'
  69. onClick = { onTextButtonClick }
  70. type = 'text'>
  71. {t('prejoin.iWantToDialIn')}
  72. </ActionButton>
  73. </div>
  74. </div>
  75. );
  76. }
  77. export default translate(DialOutDialog);