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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. // @flow
  2. import React from 'react';
  3. import { translate } from '../../../base/i18n';
  4. import { Icon, IconClose } from '../../../base/icons';
  5. import ActionButton from '../buttons/ActionButton';
  6. import CountryPicker from '../country-picker/CountryPicker';
  7. import Label from '../Label';
  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 wich 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. size = { 24 }
  45. src = { IconClose } />
  46. </div>
  47. <Label>{t('prejoin.callMeAtNumber')}</Label>
  48. <div className = 'prejoin-dialog-callout-picker'>
  49. <CountryPicker onSubmit = { onSubmit } />
  50. </div>
  51. <ActionButton
  52. className = 'prejoin-dialog-btn'
  53. onClick = { onSubmit }
  54. type = 'primary'>
  55. {t('prejoin.callMe')}
  56. </ActionButton>
  57. <div className = 'prejoin-dialog-delimiter-container'>
  58. <div className = 'prejoin-dialog-delimiter' />
  59. <div className = 'prejoin-dialog-delimiter-txt-container'>
  60. <span className = 'prejoin-dialog-delimiter-txt'>
  61. {t('prejoin.or')}
  62. </span>
  63. </div>
  64. </div>
  65. <div className = 'prejoin-dialog-dialin-container'>
  66. <ActionButton
  67. className = 'prejoin-dialog-btn'
  68. onClick = { onTextButtonClick }
  69. type = 'text'>
  70. {t('prejoin.iWantToDialIn')}
  71. </ActionButton>
  72. </div>
  73. </div>
  74. );
  75. }
  76. export default translate(DialOutDialog);