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.

ChatDialog.js 931B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // @flow
  2. import React from 'react';
  3. import { Dialog } from '../../../base/dialog';
  4. import Header from './ChatDialogHeader';
  5. type Props = {
  6. /**
  7. * Children of the component.
  8. */
  9. children: React$Node,
  10. /**
  11. * Whether the polls feature is enabled or not.
  12. */
  13. isPollsEnabled: boolean
  14. }
  15. /**
  16. * Component that renders the content of the chat in a modal.
  17. *
  18. * @returns {React$Element<any>}
  19. */
  20. function ChatDialog({ children, isPollsEnabled }: Props) {
  21. return (
  22. <Dialog
  23. customHeader = { Header }
  24. disableEnter = { true }
  25. disableFooter = { true }
  26. hideCancelButton = { true }
  27. submitDisabled = { true }
  28. titleKey = { isPollsEnabled ? 'chat.titleWithPolls' : 'chat.title' } >
  29. <div className = 'chat-dialog'>
  30. {children}
  31. </div>
  32. </Dialog>
  33. );
  34. }
  35. export default ChatDialog;