From fc356e8eff7f21afa87f8809c08dd375fc4be70b Mon Sep 17 00:00:00 2001 From: 1526853 Date: Sun, 9 Jun 2019 22:34:21 -0400 Subject: [PATCH] Enabled sidenav overlay. --- src/client/components/nav-bar/NavBar.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/client/components/nav-bar/NavBar.js b/src/client/components/nav-bar/NavBar.js index ccfc388..155ba2a 100644 --- a/src/client/components/nav-bar/NavBar.js +++ b/src/client/components/nav-bar/NavBar.js @@ -23,6 +23,15 @@ class NavBar extends React.Component { componentDidMount() { const sidenav = document.querySelector('.side-nav') M.Sidenav.init(sidenav, {closeOnClick: true}) + + this.initSidenavOverlay() + } + + initSidenavOverlay(){ + const sidenavOverlay = document.querySelector('.sidenav-overlay') + sidenavOverlay.setAttribute('id', 'sidenav-overlay') + sidenavOverlay.style.opacity = 0 + sidenavOverlay.style.display = 'none' } render() {