DrawerDialogDemo() — ui Function Reference
Architecture documentation for the DrawerDialogDemo() function in drawer-dialog.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 1689f2a5_73f6_f842_1c78_9b97ebf3d8b5["DrawerDialogDemo()"] 4628e010_da76_cf34_a78b_5c0b4ab8e1c2["drawer-dialog.tsx"] 1689f2a5_73f6_f842_1c78_9b97ebf3d8b5 -->|defined in| 4628e010_da76_cf34_a78b_5c0b4ab8e1c2 style 1689f2a5_73f6_f842_1c78_9b97ebf3d8b5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/examples/base/drawer-dialog.tsx lines 29–74
export function DrawerDialogDemo() {
const [open, setOpen] = React.useState(false)
const isDesktop = useMediaQuery("(min-width: 768px)")
if (isDesktop) {
return (
<Dialog open={open} onOpenChange={setOpen}>
<DialogTrigger render={<Button variant="outline" />}>
Edit Profile
</DialogTrigger>
<DialogContent className="sm:max-w-[425px]">
<DialogHeader>
<DialogTitle>Edit profile</DialogTitle>
<DialogDescription>
Make changes to your profile here. Click save when you're
done.
</DialogDescription>
</DialogHeader>
<ProfileForm />
</DialogContent>
</Dialog>
)
}
return (
<Drawer open={open} onOpenChange={setOpen}>
<DrawerTrigger asChild>
<Button variant="outline">Edit Profile</Button>
</DrawerTrigger>
<DrawerContent>
<DrawerHeader className="text-left">
<DrawerTitle>Edit profile</DrawerTitle>
<DrawerDescription>
Make changes to your profile here. Click save when you're done.
</DrawerDescription>
</DrawerHeader>
<ProfileForm className="px-4" />
<DrawerFooter className="pt-2">
<DrawerClose asChild>
<Button variant="outline">Cancel</Button>
</DrawerClose>
</DrawerFooter>
</DrawerContent>
</Drawer>
)
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does DrawerDialogDemo() do?
DrawerDialogDemo() is a function in the ui codebase, defined in apps/v4/examples/base/drawer-dialog.tsx.
Where is DrawerDialogDemo() defined?
DrawerDialogDemo() is defined in apps/v4/examples/base/drawer-dialog.tsx at line 29.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free