Skip to content

armgit / vaul

Public Imported from GitHub
0

A drawer component for React.

Use scaleBackground function instead of reset

emilkowalski3f195757e880
diff --git a/src/index.tsx b/src/index.tsx
index c9b31bc..3360850 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -293,10 +293,9 @@ function Root({
React.useEffect(() => {
// Clean up the wrapper styles in case the drawer has been unmounted without closing it
const wrapper = document.querySelector('[vaul-drawer-wrapper]');
+
if (wrapper) {
- return () => {
- reset(wrapper);
- };
+ return () => scaleBackground(false);
}
}, []);