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.

JitsiPortal.js 703B

123456789101112131415161718192021222324252627282930313233
  1. // @flow
  2. import React from 'react';
  3. import DialogPortal from './DialogPortal';
  4. type Props = {
  5. /**
  6. * The component(s) to be displayed within the drawer portal.
  7. */
  8. children: React$Node,
  9. /**
  10. * Class name used to add custom styles to the portal.
  11. */
  12. className?: string
  13. };
  14. /**
  15. * Component meant to render a drawer at the bottom of the screen,
  16. * by creating a portal containing the component's children.
  17. *
  18. * @returns {ReactElement}
  19. */
  20. function JitsiPortal({ children, className }: Props) {
  21. return (
  22. <DialogPortal className = { `drawer-portal ${className ?? ''}` }>
  23. { children }
  24. </DialogPortal>
  25. );
  26. }
  27. export default JitsiPortal;