@zag-js/remove-scroll
Advanced tools
Comparing version 0.76.0 to 0.77.0
@@ -9,6 +9,12 @@ 'use strict'; | ||
if (!el) return; | ||
const previousStyle = el.style.cssText; | ||
const previousStyle = Object.keys(style).reduce( | ||
(acc, key) => { | ||
acc[key] = el.style.getPropertyValue(key); | ||
return acc; | ||
}, | ||
{} | ||
); | ||
Object.assign(el.style, style); | ||
return () => { | ||
el.style.cssText = previousStyle; | ||
Object.assign(el.style, previousStyle); | ||
}; | ||
@@ -15,0 +21,0 @@ } |
{ | ||
"name": "@zag-js/remove-scroll", | ||
"version": "0.76.0", | ||
"version": "0.77.0", | ||
"description": "JavaScript utility to remove scroll on body", | ||
@@ -22,3 +22,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@zag-js/dom-query": "0.76.0" | ||
"@zag-js/dom-query": "0.77.0" | ||
}, | ||
@@ -25,0 +25,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7853
147
+ Added@zag-js/dom-query@0.77.0(transitive)
- Removed@zag-js/dom-query@0.76.0(transitive)
Updated@zag-js/dom-query@0.77.0