A drawer component for React.
fix: pointer events none (#449)
Emil Kowalski717a78da10af
diff --git a/src/index.tsx b/src/index.tsxindex d63b99b..9535bda 100644--- a/src/index.tsx+++ b/src/index.tsx@@ -703,7 +703,13 @@ export const Overlay = React.forwardRef<HTMLDivElement, React.ComponentPropsWithconst hasSnapPoints = snapPoints && snapPoints.length > 0;// Overlay is the component that is locking scroll, removing it will unlock the scroll without having to dig into Radix's Dialog library- if (!modal) return null;+ if (!modal) {+ // Need to do this manually unfortunately+ window.requestAnimationFrame(() => {+ document.body.style.pointerEvents = 'auto';+ });+ return null;+ }return (<DialogPrimitive.Overlay