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.

DialInNumber.web.js 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. import React, { Component } from 'react';
  2. import PropTypes from 'prop-types';
  3. import { translate } from '../../../base/i18n';
  4. /**
  5. * React {@code Component} responsible for displaying a telephone number and
  6. * conference ID for dialing into a conference.
  7. *
  8. * @extends Component
  9. */
  10. class DialInNumber extends Component {
  11. /**
  12. * {@code DialInNumber} component's property types.
  13. *
  14. * @static
  15. */
  16. static propTypes = {
  17. /**
  18. * The numberic identifier for the current conference, used after
  19. * dialing a the number to join the conference.
  20. */
  21. conferenceID: PropTypes.number,
  22. /**
  23. * The phone number to dial to begin the process of dialing into a
  24. * conference.
  25. */
  26. phoneNumber: PropTypes.string,
  27. /**
  28. * Invoked to obtain translated strings.
  29. */
  30. t: PropTypes.func
  31. };
  32. /**
  33. * Implements React's {@link Component#render()}.
  34. *
  35. * @inheritdoc
  36. * @returns {ReactElement}
  37. */
  38. render() {
  39. const { conferenceID, phoneNumber, t } = this.props;
  40. return (
  41. <div className = 'dial-in-number'>
  42. <span className = 'phone-number'>
  43. <span className = 'info-label'>
  44. { t('info.dialInNumber') }
  45. </span>
  46. <span className = 'spacer'>&nbsp;</span>
  47. <span className = 'info-value'>
  48. { phoneNumber }
  49. </span>
  50. </span>
  51. <span className = 'spacer'>&nbsp;</span>
  52. <span className = 'conference-id'>
  53. <span className = 'info-label'>
  54. { t('info.dialInConferenceID') }
  55. </span>
  56. <span className = 'spacer'>&nbsp;</span>
  57. <span className = 'info-value'>
  58. { `${conferenceID}#` }
  59. </span>
  60. </span>
  61. </div>
  62. );
  63. }
  64. }
  65. export default translate(DialInNumber);