nav-projects.tsx — ui Source File
Architecture documentation for nav-projects.tsx, a tsx file in the ui codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR e0cdc1ff_cafd_2d34_0b24_2866be9da21d["nav-projects.tsx"] d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"] e0cdc1ff_cafd_2d34_0b24_2866be9da21d --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3 194a9418_8170_2169_6f94_b2f555b74f26["dropdown-menu"] e0cdc1ff_cafd_2d34_0b24_2866be9da21d --> 194a9418_8170_2169_6f94_b2f555b74f26 6ff5c02b_2b25_4633_4ccd_fd28f2f55862["sidebar"] e0cdc1ff_cafd_2d34_0b24_2866be9da21d --> 6ff5c02b_2b25_4633_4ccd_fd28f2f55862 style e0cdc1ff_cafd_2d34_0b24_2866be9da21d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"use client"
import {
Folder,
Forward,
MoreHorizontal,
Trash2,
type LucideIcon,
} from "lucide-react"
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "@/registry/new-york/ui/dropdown-menu"
import {
SidebarGroup,
SidebarGroupLabel,
SidebarMenu,
SidebarMenuAction,
SidebarMenuButton,
SidebarMenuItem,
useSidebar,
} from "@/registry/new-york/ui/sidebar"
export function NavProjects({
projects,
}: {
projects: {
name: string
url: string
icon: LucideIcon
}[]
}) {
const { isMobile } = useSidebar()
return (
<SidebarGroup className="group-data-[collapsible=icon]:hidden">
<SidebarGroupLabel>Projects</SidebarGroupLabel>
<SidebarMenu>
{projects.map((item) => (
<SidebarMenuItem key={item.name}>
<SidebarMenuButton asChild>
<a href={item.url}>
<item.icon />
<span>{item.name}</span>
</a>
</SidebarMenuButton>
<DropdownMenu>
<DropdownMenuTrigger asChild>
<SidebarMenuAction showOnHover>
<MoreHorizontal />
<span className="sr-only">More</span>
</SidebarMenuAction>
</DropdownMenuTrigger>
<DropdownMenuContent
className="w-48 rounded-lg"
side={isMobile ? "bottom" : "right"}
align={isMobile ? "end" : "start"}
>
<DropdownMenuItem>
<Folder className="text-muted-foreground" />
<span>View Project</span>
</DropdownMenuItem>
<DropdownMenuItem>
<Forward className="text-muted-foreground" />
<span>Share Project</span>
</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuItem>
<Trash2 className="text-muted-foreground" />
<span>Delete Project</span>
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
</SidebarMenuItem>
))}
<SidebarMenuItem>
<SidebarMenuButton className="text-sidebar-foreground/70">
<MoreHorizontal className="text-sidebar-foreground/70" />
<span>More</span>
</SidebarMenuButton>
</SidebarMenuItem>
</SidebarMenu>
</SidebarGroup>
)
}
Domain
Subdomains
Functions
Dependencies
- dropdown-menu
- lucide-react
- sidebar
Source
Frequently Asked Questions
What does nav-projects.tsx do?
nav-projects.tsx is a source file in the ui codebase, written in tsx. It belongs to the ComponentRegistry domain, ChartRegistry subdomain.
What functions are defined in nav-projects.tsx?
nav-projects.tsx defines 1 function(s): NavProjects.
What does nav-projects.tsx depend on?
nav-projects.tsx imports 3 module(s): dropdown-menu, lucide-react, sidebar.
Where is nav-projects.tsx in the architecture?
nav-projects.tsx is located at deprecated/www/registry/new-york/internal/sink/components/nav-projects.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: deprecated/www/registry/new-york/internal/sink/components).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free