From d200978498b7879cd637b6a354014a0c8a31d55c Mon Sep 17 00:00:00 2001 From: johndoe6345789 Date: Sat, 17 Jan 2026 16:50:38 +0000 Subject: [PATCH] Edited Spark --- src/components/Navigation.tsx | 248 +++++++++++++++++----------------- 1 file changed, 124 insertions(+), 124 deletions(-) diff --git a/src/components/Navigation.tsx b/src/components/Navigation.tsx index b63775e..68c77c9 100644 --- a/src/components/Navigation.tsx +++ b/src/components/Navigation.tsx @@ -1,124 +1,124 @@ -import { createContext, useContext, useState } from 'react' -import { Link, useLocation } from 'react-router-dom' -import { motion } from 'framer-motion' -import { Button } from '@/components/ui/button' -import { - List, - X, - House, - Atom, - FlowArrow, - Layout, -} from '@phosphor-icons/react' -import { cn } from '@/lib/utils' - -const navigationItems = [ - { path: '/', label: 'Home', icon: House }, - { path: '/atoms', label: 'Atoms', icon: Atom }, - { path: '/molecules', label: 'Molecules', icon: FlowArrow }, - { path: '/organisms', label: 'Organisms', icon: (props: any) => }, - { path: '/templates', label: 'Templates', icon: Layout }, -] - -interface NavigationContextType { - menuOpen: boolean - setMenuOpen: (open: boolean) => void -} - -const NavigationContext = createContext(undefined) - -export function NavigationProvider({ children }: { children: React.ReactNode }) { - const [menuOpen, setMenuOpen] = useState(false) - - return ( - - {children} - - ) -} - -export function useNavigation() { - const context = useContext(NavigationContext) - if (!context) { - throw new Error('useNavigation must be used within NavigationProvider') - } - return context -} - -export function Navigation() { - const { menuOpen, setMenuOpen } = useNavigation() - - return ( - - ) -} - -export function NavigationSidebar() { - const { menuOpen, setMenuOpen } = useNavigation() - const location = useLocation() - - return ( - -
-
-

Navigation

- -
- - - -
-

- CodeSnippet Library -

-
-
-
- ) -} +import { createContext, useContext, useState } from 'react' +import { Link, useLocation } from 'react-router-dom' +import { motion } from 'framer-motion' +import { Button } from '@/components/ui/button' + List, + House + Fl +} from ' + Atom, + FlowArrow, + Layout, +} from '@phosphor-icons/react' +import { cn } from '@/lib/utils' + +const navigationItems = [ + { path: '/', label: 'Home', icon: House }, + + menuOpen: boolean +} +const NavigationContext = createContext setMenuOpen(!menuOpen)} + + + vari + + + + + + + +
  • + + + + + +