nav-documents.tsx — ui Source File
Architecture documentation for nav-documents.tsx, a tsx file in the ui codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 053fd816_f68c_b2b3_8685_5d2972c78b78["nav-documents.tsx"] 39a0d62e_8e7d_d097_eb95_91d2bca361f7["icons-react"] 053fd816_f68c_b2b3_8685_5d2972c78b78 --> 39a0d62e_8e7d_d097_eb95_91d2bca361f7 d1cb37f2_0d1d_01bc_0d60_a15219afac51["dropdown-menu"] 053fd816_f68c_b2b3_8685_5d2972c78b78 --> d1cb37f2_0d1d_01bc_0d60_a15219afac51 12632a83_ef01_5f03_4110_ed33d49893b7["sidebar"] 053fd816_f68c_b2b3_8685_5d2972c78b78 --> 12632a83_ef01_5f03_4110_ed33d49893b7 style 053fd816_f68c_b2b3_8685_5d2972c78b78 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"use client"
import {
IconDots,
IconFolder,
IconShare3,
IconTrash,
type Icon,
} from "@tabler/icons-react"
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "@/registry/new-york-v4/ui/dropdown-menu"
import {
SidebarGroup,
SidebarGroupLabel,
SidebarMenu,
SidebarMenuAction,
SidebarMenuButton,
SidebarMenuItem,
useSidebar,
} from "@/registry/new-york-v4/ui/sidebar"
export function NavDocuments({
items,
}: {
items: {
name: string
url: string
icon: Icon
}[]
}) {
const { isMobile } = useSidebar()
return (
<SidebarGroup className="group-data-[collapsible=icon]:hidden">
<SidebarGroupLabel>Documents</SidebarGroupLabel>
<SidebarMenu>
{items.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
className="data-[state=open]:bg-accent rounded-sm"
>
<IconDots />
<span className="sr-only">More</span>
</SidebarMenuAction>
</DropdownMenuTrigger>
<DropdownMenuContent
className="w-24 rounded-lg"
side={isMobile ? "bottom" : "right"}
align={isMobile ? "end" : "start"}
>
<DropdownMenuItem>
<IconFolder />
<span>Open</span>
</DropdownMenuItem>
<DropdownMenuItem>
<IconShare3 />
<span>Share</span>
</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuItem variant="destructive">
<IconTrash />
<span>Delete</span>
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
</SidebarMenuItem>
))}
<SidebarMenuItem>
<SidebarMenuButton className="text-sidebar-foreground/70">
<IconDots className="text-sidebar-foreground/70" />
<span>More</span>
</SidebarMenuButton>
</SidebarMenuItem>
</SidebarMenu>
</SidebarGroup>
)
}
Domain
Subdomains
Functions
Dependencies
- dropdown-menu
- icons-react
- sidebar
Source
Frequently Asked Questions
What does nav-documents.tsx do?
nav-documents.tsx is a source file in the ui codebase, written in tsx. It belongs to the DocumentationAtlas domain, SearchAPI subdomain.
What functions are defined in nav-documents.tsx?
nav-documents.tsx defines 1 function(s): NavDocuments.
What does nav-documents.tsx depend on?
nav-documents.tsx imports 3 module(s): dropdown-menu, icons-react, sidebar.
Where is nav-documents.tsx in the architecture?
nav-documents.tsx is located at apps/v4/app/(examples)/dashboard/components/nav-documents.tsx (domain: DocumentationAtlas, subdomain: SearchAPI, directory: apps/v4/app/(examples)/dashboard/components).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free