@fenderdigital/react-off-canvas
Advanced tools
@@ -90,3 +90,5 @@ 'use strict'; | ||
if ((0, _dom2.default)()) { | ||
var body = document.querySelector('body'); | ||
var html = document.querySelector('html'); | ||
body.className = isVisible ? 'relative overflow-hidden overflow-auto-l' : ''; | ||
html.className = isVisible ? 'overflow-hidden overflow-auto-l' : ''; | ||
@@ -93,0 +95,0 @@ } |
@@ -30,3 +30,3 @@ { | ||
}, | ||
"version": "1.6.0", | ||
"version": "1.6.1", | ||
"dependencies": { | ||
@@ -33,0 +33,0 @@ "@fenderdigital/dom": "^1.0.6" |
@@ -51,3 +51,7 @@ import React from 'react'; | ||
if (isDomUsuable()) { | ||
const body = document.querySelector('body'); | ||
const html = document.querySelector('html'); | ||
body.className = isVisible | ||
? 'relative overflow-hidden overflow-auto-l' | ||
: ''; | ||
html.className = isVisible ? 'overflow-hidden overflow-auto-l' : ''; | ||
@@ -54,0 +58,0 @@ } |
181237
0.17%356
1.71%