MCPcopy Create free account
hub / github.com/TheOrcDev/orcish-fullstack-admin / MobileNav

Function MobileNav

components/ui/mobile-nav.tsx:18–70  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16import { navItems } from "./sidebar";
17
18export default function MobileNav() {
19 const pathname = usePathname();
20
21 return (
22 <Sheet>
23 <SheetTrigger asChild>
24 <Button variant="outline" size="icon" className="shrink-0 md:hidden">
25 <Menu className="h-5 w-5" />
26 <span className="sr-only">Toggle navigation menu</span>
27 </Button>
28 </SheetTrigger>
29 <SheetContent side="left" className="flex flex-col">
30 <nav className="grid gap-2 text-lg font-medium">
31 <Link
32 href="#"
33 className="flex items-center gap-2 text-lg font-semibold"
34 >
35 <Package2 className="h-6 w-6" />
36 <span className="sr-only">Acme Inc</span>
37 </Link>
38 {navItems.map((navItem) => (
39 <Link
40 key={navItem.label}
41 href={navItem.href}
42 className={`flex items-center gap-3 rounded-lg px-3 py-2 text-muted-foreground transition-all hover:text-primary ${
43 pathname === navItem.href ? "bg-muted text-primary" : ""
44 }`}
45 >
46 {navItem.icon}
47 {navItem.label}
48 </Link>
49 ))}
50 </nav>
51 <div className="mt-auto">
52 <Card>
53 <CardHeader>
54 <CardTitle>Upgrade to Pro</CardTitle>
55 <CardDescription>
56 Unlock all features and get unlimited access to our support
57 team.
58 </CardDescription>
59 </CardHeader>
60 <CardContent>
61 <Button size="sm" className="w-full">
62 Upgrade
63 </Button>
64 </CardContent>
65 </Card>
66 </div>
67 </SheetContent>
68 </Sheet>
69 );
70}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected