import { Box } from "@mui/material";
import { PropsWithChildren } from "react";

export function OverlayItem(props: PropsWithChildren) {
	return (
		<Box
			sx={{
				pointerEvents: "auto",
				position: "absolute",
				overflow: "hidden",
				cursor: "auto",
				maxHeight: "100%",
			}}
			onDoubleClick={(e) => e.stopPropagation()}
			onMouseMove={(e) => e.stopPropagation()}
			onWheelCapture={(e) => e.stopPropagation()}
		>
			{props.children && props.children}
		</Box>
	);
}
