DrawerDialogDemo() — ui Function Reference
Architecture documentation for the DrawerDialogDemo() function in drawer-dialog.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 42f5b031_f961_556c_c0ff_e7e7d8670c36["DrawerDialogDemo()"] 69e37eb1_61e5_41b7_c3e4_5cfaf0c8ae27["drawer-dialog.tsx"] 42f5b031_f961_556c_c0ff_e7e7d8670c36 -->|defined in| 69e37eb1_61e5_41b7_c3e4_5cfaf0c8ae27 style 42f5b031_f961_556c_c0ff_e7e7d8670c36 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/examples/radix/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 asChild>
<Button variant="outline">Edit Profile</Button>
</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/radix/drawer-dialog.tsx.
Where is DrawerDialogDemo() defined?
DrawerDialogDemo() is defined in apps/v4/examples/radix/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