dropdown-menu-dialog.tsx — ui Source File
Architecture documentation for dropdown-menu-dialog.tsx, a tsx file in the ui codebase. 9 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 70741c01_c1c5_471b_b44f_dd29f0b585d8["dropdown-menu-dialog.tsx"] 1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"] 70741c01_c1c5_471b_b44f_dd29f0b585d8 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2 d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"] 70741c01_c1c5_471b_b44f_dd29f0b585d8 --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3 57e86e45_ac6e_7278_be08_9092724e8401["button"] 70741c01_c1c5_471b_b44f_dd29f0b585d8 --> 57e86e45_ac6e_7278_be08_9092724e8401 0896a8fa_5462_a73a_5add_fb8176921778["dialog"] 70741c01_c1c5_471b_b44f_dd29f0b585d8 --> 0896a8fa_5462_a73a_5add_fb8176921778 d1cb37f2_0d1d_01bc_0d60_a15219afac51["dropdown-menu"] 70741c01_c1c5_471b_b44f_dd29f0b585d8 --> d1cb37f2_0d1d_01bc_0d60_a15219afac51 169af77a_46c3_8fec_4801_f34a0f1a3471["field"] 70741c01_c1c5_471b_b44f_dd29f0b585d8 --> 169af77a_46c3_8fec_4801_f34a0f1a3471 80cf663d_a411_487c_d69e_ac9d405cd2ec["input"] 70741c01_c1c5_471b_b44f_dd29f0b585d8 --> 80cf663d_a411_487c_d69e_ac9d405cd2ec d752035b_6ed3_c6ef_e27c_eef51af9ec8d["label"] 70741c01_c1c5_471b_b44f_dd29f0b585d8 --> d752035b_6ed3_c6ef_e27c_eef51af9ec8d a1802a9d_1c52_7ef5_709a_134c4400c1c3["textarea"] 70741c01_c1c5_471b_b44f_dd29f0b585d8 --> a1802a9d_1c52_7ef5_709a_134c4400c1c3 style 70741c01_c1c5_471b_b44f_dd29f0b585d8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
"use client"
import { useState } from "react"
import { MoreHorizontalIcon } from "lucide-react"
import { Button } from "@/registry/new-york-v4/ui/button"
import {
Dialog,
DialogClose,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
} from "@/registry/new-york-v4/ui/dialog"
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuGroup,
DropdownMenuItem,
DropdownMenuLabel,
DropdownMenuTrigger,
} from "@/registry/new-york-v4/ui/dropdown-menu"
import { Field, FieldGroup, FieldLabel } from "@/registry/new-york-v4/ui/field"
import { Input } from "@/registry/new-york-v4/ui/input"
import { Label } from "@/registry/new-york-v4/ui/label"
import { Textarea } from "@/registry/new-york-v4/ui/textarea"
export default function DropdownMenuDialog() {
const [showNewDialog, setShowNewDialog] = useState(false)
const [showShareDialog, setShowShareDialog] = useState(false)
return (
<>
<DropdownMenu modal={false}>
<DropdownMenuTrigger asChild>
<Button variant="outline" aria-label="Open menu" size="icon-sm">
<MoreHorizontalIcon />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent className="w-40" align="end">
<DropdownMenuLabel>File Actions</DropdownMenuLabel>
<DropdownMenuGroup>
<DropdownMenuItem onSelect={() => setShowNewDialog(true)}>
New File...
</DropdownMenuItem>
<DropdownMenuItem onSelect={() => setShowShareDialog(true)}>
Share...
</DropdownMenuItem>
<DropdownMenuItem disabled>Download</DropdownMenuItem>
</DropdownMenuGroup>
</DropdownMenuContent>
</DropdownMenu>
<Dialog open={showNewDialog} onOpenChange={setShowNewDialog}>
<DialogContent className="sm:max-w-[425px]">
<DialogHeader>
<DialogTitle>Create New File</DialogTitle>
<DialogDescription>
Provide a name for your new file. Click create when you're
done.
</DialogDescription>
</DialogHeader>
<FieldGroup className="pb-3">
<Field>
<FieldLabel htmlFor="filename">File Name</FieldLabel>
<Input id="filename" name="filename" placeholder="document.txt" />
</Field>
</FieldGroup>
<DialogFooter>
<DialogClose asChild>
<Button variant="outline">Cancel</Button>
</DialogClose>
<Button type="submit">Create</Button>
</DialogFooter>
</DialogContent>
</Dialog>
<Dialog open={showShareDialog} onOpenChange={setShowShareDialog}>
<DialogContent className="sm:max-w-[425px]">
<DialogHeader>
<DialogTitle>Share File</DialogTitle>
<DialogDescription>
Anyone with the link will be able to view this file.
</DialogDescription>
</DialogHeader>
<FieldGroup className="py-3">
<Field>
<Label htmlFor="email">Email Address</Label>
<Input
id="email"
name="email"
type="email"
placeholder="shadcn@vercel.com"
autoComplete="off"
/>
</Field>
<Field>
<FieldLabel htmlFor="message">Message (Optional)</FieldLabel>
<Textarea
id="message"
name="message"
placeholder="Check out this file"
/>
</Field>
</FieldGroup>
<DialogFooter>
<DialogClose asChild>
<Button variant="outline">Cancel</Button>
</DialogClose>
<Button type="submit">Send Invite</Button>
</DialogFooter>
</DialogContent>
</Dialog>
</>
)
}
Domain
Subdomains
Functions
Dependencies
- button
- dialog
- dropdown-menu
- field
- input
- label
- lucide-react
- react
- textarea
Source
Frequently Asked Questions
What does dropdown-menu-dialog.tsx do?
dropdown-menu-dialog.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 dropdown-menu-dialog.tsx?
dropdown-menu-dialog.tsx defines 1 function(s): DropdownMenuDialog.
What does dropdown-menu-dialog.tsx depend on?
dropdown-menu-dialog.tsx imports 9 module(s): button, dialog, dropdown-menu, field, input, label, lucide-react, react, and 1 more.
Where is dropdown-menu-dialog.tsx in the architecture?
dropdown-menu-dialog.tsx is located at apps/v4/registry/new-york-v4/examples/dropdown-menu-dialog.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: apps/v4/registry/new-york-v4/examples).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free