Spaces:
Paused
Paused
Update components/GlassDrawer.js
Browse files
components/GlassDrawer.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
import { motion, AnimatePresence } from "framer-motion";
|
| 2 |
|
| 3 |
export default function GlassDrawer({ isOpen, setIsOpen }) {
|
|
@@ -5,6 +6,7 @@ export default function GlassDrawer({ isOpen, setIsOpen }) {
|
|
| 5 |
<AnimatePresence>
|
| 6 |
{isOpen && (
|
| 7 |
<>
|
|
|
|
| 8 |
<motion.div
|
| 9 |
initial={{ opacity: 0 }}
|
| 10 |
animate={{ opacity: 1 }}
|
|
@@ -12,6 +14,8 @@ export default function GlassDrawer({ isOpen, setIsOpen }) {
|
|
| 12 |
onClick={() => setIsOpen(false)}
|
| 13 |
className="fixed inset-0 bg-black/20 backdrop-blur-sm z-40"
|
| 14 |
/>
|
|
|
|
|
|
|
| 15 |
<motion.div
|
| 16 |
initial={{ x: "-100%" }}
|
| 17 |
animate={{ x: 0 }}
|
|
@@ -20,7 +24,7 @@ export default function GlassDrawer({ isOpen, setIsOpen }) {
|
|
| 20 |
className="fixed top-0 left-0 bottom-0 w-3/4 max-w-xs z-50 bg-white/60 backdrop-blur-2xl border-r border-white/50 p-8 pt-16"
|
| 21 |
>
|
| 22 |
<h2 className="text-2xl font-bold text-[#1E293B] mb-8">Menu</h2>
|
| 23 |
-
{/*
|
| 24 |
</motion.div>
|
| 25 |
</>
|
| 26 |
)}
|
|
|
|
| 1 |
+
// components/GlassDrawer.js
|
| 2 |
import { motion, AnimatePresence } from "framer-motion";
|
| 3 |
|
| 4 |
export default function GlassDrawer({ isOpen, setIsOpen }) {
|
|
|
|
| 6 |
<AnimatePresence>
|
| 7 |
{isOpen && (
|
| 8 |
<>
|
| 9 |
+
{/* Backdrop */}
|
| 10 |
<motion.div
|
| 11 |
initial={{ opacity: 0 }}
|
| 12 |
animate={{ opacity: 1 }}
|
|
|
|
| 14 |
onClick={() => setIsOpen(false)}
|
| 15 |
className="fixed inset-0 bg-black/20 backdrop-blur-sm z-40"
|
| 16 |
/>
|
| 17 |
+
|
| 18 |
+
{/* Drawer */}
|
| 19 |
<motion.div
|
| 20 |
initial={{ x: "-100%" }}
|
| 21 |
animate={{ x: 0 }}
|
|
|
|
| 24 |
className="fixed top-0 left-0 bottom-0 w-3/4 max-w-xs z-50 bg-white/60 backdrop-blur-2xl border-r border-white/50 p-8 pt-16"
|
| 25 |
>
|
| 26 |
<h2 className="text-2xl font-bold text-[#1E293B] mb-8">Menu</h2>
|
| 27 |
+
{/* Menu Items would go here */}
|
| 28 |
</motion.div>
|
| 29 |
</>
|
| 30 |
)}
|