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.

SharedVideoDialog.js 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // @flow
  2. import React from 'react';
  3. import { InputDialog } from '../../../base/dialog';
  4. import { connect } from '../../../base/redux';
  5. import { defaultSharedVideoLink } from '../../constants';
  6. import AbstractSharedVideoDialog from '../AbstractSharedVideoDialog';
  7. /**
  8. * Implements a component to render a display name prompt.
  9. */
  10. class SharedVideoDialog extends AbstractSharedVideoDialog<*> {
  11. /**
  12. * Instantiates a new component.
  13. *
  14. * @inheritdoc
  15. */
  16. constructor(props) {
  17. super(props);
  18. this._onSubmitValue = this._onSubmitValue.bind(this);
  19. }
  20. _onSubmitValue: () => boolean;
  21. /**
  22. * Callback to be invoked when the value of the link input is submitted.
  23. *
  24. * @param {string} value - The entered video link.
  25. * @returns {boolean}
  26. */
  27. _onSubmitValue(value) {
  28. return super._onSetVideoLink(value);
  29. }
  30. /**
  31. * Implements React's {@link Component#render()}.
  32. *
  33. * @inheritdoc
  34. */
  35. render() {
  36. return (
  37. <InputDialog
  38. contentKey = 'dialog.shareVideoTitle'
  39. onSubmit = { this._onSubmitValue }
  40. textInputProps = {{
  41. placeholder: defaultSharedVideoLink
  42. }} />
  43. );
  44. }
  45. }
  46. export default connect()(SharedVideoDialog);