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.tsx 709B

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