Skip to content

Commit

Permalink
fix: types
Browse files Browse the repository at this point in the history
  • Loading branch information
KaustubhKumar05 committed Oct 11, 2023
1 parent d152ef1 commit da26a19
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/roomkit-react/src/Modal/Dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,17 @@ const CustomDialogContent = ({ children, props = {}, css = {} }: { children: Rea
const CustomDialogOverlay = ({ css = {} }: { css?: CSS }) => (
<StyledDialogOverlay css={{ ...css, position: 'absolute' }} />
);
const CustomDialogPortal = ({ children }: { children: ReactNode }) => {
const CustomDialogPortal = ({ children, container }: { children: ReactNode; container: HTMLElement | null }) => {
const dialogContainerSelector = useDialogContainerSelector();
return (
<StyledDialogPortal
container={dialogContainerSelector ? (document.querySelector(dialogContainerSelector) as HTMLElement) : undefined}
container={
container
? container
: dialogContainerSelector
? (document.querySelector(dialogContainerSelector) as HTMLElement)
: undefined
}
>
{children}
</StyledDialogPortal>
Expand Down

0 comments on commit da26a19

Please sign in to comment.