diff --git a/src/Navbar.js b/src/Navbar.js index 15431a1..5cfcce6 100644 --- a/src/Navbar.js +++ b/src/Navbar.js @@ -1,9 +1,10 @@ -import { useEffect, useState } from "react"; +import { useState, useEffect } from "react"; function Navbar() { const [prevScrollPos, setPrevScrollPos] = useState(window.scrollY); const [hidden, setHidden] = useState(false); const [isScrolled, setIsScrolled] = useState(false); + const [isMenuOpen, setIsMenuOpen] = useState(false); useEffect(() => { const handleScroll = () => { @@ -22,6 +23,11 @@ function Navbar() { return () => window.removeEventListener("scroll", handleScroll); }, [prevScrollPos]); + + const toggleMenu = () => { + setIsMenuOpen(!isMenuOpen); + }; + return (
-

+

Makhija Arcade, 35th Rd, Khar, Khar West, Mumbai, Maharashtra 400052

- -

- Daily : 8.00 am to 10.00 pm -

-

- +91 9136036603 -

+

Daily : 8.00 am to 10.00 pm

+

+91 9136036603

- - sales@603thecoworkingspace.com - + sales@603thecoworkingspace.com
@@ -62,14 +58,14 @@ function Navbar() { width="160" height="50" alt="Grilli - Home" - class="logohover" + className="logohover" /> -
); } -export default Navbar; +export default Navbar; \ No newline at end of file diff --git a/src/style.css b/src/style.css index d590fc8..10072fd 100644 --- a/src/style.css +++ b/src/style.css @@ -2536,4 +2536,48 @@ textarea.input-field { background-color: inherit; animation: pulse 2s infinite; z-index: 9999; +} +@media (max-width: 768px) { + .navbar { + position: fixed; + top: 0; + right: -100%; + width: 80%; + max-width: 400px; + height: 100vh; + background-color: #fff; + transition: right 0.3s ease-in-out; + z-index: 1000; + overflow-y: auto; + } + + .navbar.active { + right: 0; + } + + .overlay { + display: none; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.5); + z-index: 999; + } + + .overlay.active { + display: block; + } + + .nav-open-btn { + display: block; + } + + .close-btn { + display: block; + position: absolute; + top: 10px; + right: 10px; + } } \ No newline at end of file