import { FloatingFocusManager, FloatingOverlay, FloatingPortal, useMergeRefs, } from "@floating-ui/react"; import { ComponentProps, RefObject } from "react"; import { useModalContext } from "./useModalContext"; import clsx from "clsx"; import { Dialog } from "../dialog/Dialog"; interface Props extends ComponentProps<"div"> { ref?: RefObject; zClassName?: string; } export function ModalContent({ zClassName, style, className, children, ref, ...props }: Props) { const context = useModalContext(); const floatingContext = context.context; const mergedRef = useMergeRefs([context.refs.setFloating, ref]); if (!context.open) { return null; } return ( event.stopPropagation()} >
{children}
); }