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.

ShareVideoConfirmDialog.tsx 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. import React from 'react';
  2. import { useTranslation } from 'react-i18next';
  3. import ConfirmDialog from '../../../base/dialog/components/native/ConfirmDialog';
  4. import { DialogProps } from '../../../base/dialog/constants';
  5. interface IProps extends DialogProps {
  6. /**
  7. * The name of the remote participant that shared the video.
  8. */
  9. actorName: string;
  10. /**
  11. * The function to execute when confirmed.
  12. */
  13. onSubmit: () => void;
  14. }
  15. /**
  16. * Dialog to confirm playing a video shared from a remote participant.
  17. *
  18. * @returns {JSX.Element}
  19. */
  20. export default function ShareVideoConfirmDialog({ actorName, onSubmit }: IProps): JSX.Element {
  21. const { t } = useTranslation();
  22. return (
  23. <ConfirmDialog
  24. cancelLabel = 'dialog.Cancel'
  25. confirmLabel = 'dialog.Ok'
  26. descriptionKey = 'dialog.shareVideoConfirmPlay'
  27. onSubmit = { onSubmit }
  28. title = { t('dialog.shareVideoConfirmPlayTitle', {
  29. name: actorName
  30. }) } />
  31. );
  32. }