jiti-meet/react/features/toolbox/components/web/JitsiPortal.tsx

33 lines
709 B
TypeScript
Raw Normal View History

2023-02-02 11:12:31 +00:00
import React, { ReactNode } from 'react';
import DialogPortal from './DialogPortal';
type Props = {
/**
* The component(s) to be displayed within the drawer portal.
*/
2023-02-02 11:12:31 +00:00
children: ReactNode;
/**
* Class name used to add custom styles to the portal.
*/
2023-02-02 11:12:31 +00:00
className?: string;
};
/**
* Component meant to render a drawer at the bottom of the screen,
* by creating a portal containing the component's children.
*
* @returns {ReactElement}
*/
function JitsiPortal({ children, className }: Props) {
return (
<DialogPortal className = { `drawer-portal ${className ?? ''}` }>
{ children }
</DialogPortal>
);
}
export default JitsiPortal;