{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "drawer-dialog", "type": "registry:example", "author": "shadcn (https://ui.shadcn.com)", "registryDependencies": [ "drawer", "dialog" ], "files": [ { "path": "examples/drawer-dialog.tsx", "content": "import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { useMediaQuery } from \"@/hooks/use-media-query\"\nimport { Button } from \"@/registry/default/ui/button\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/registry/default/ui/dialog\"\nimport {\n Drawer,\n DrawerClose,\n DrawerContent,\n DrawerDescription,\n DrawerFooter,\n DrawerHeader,\n DrawerTitle,\n DrawerTrigger,\n} from \"@/registry/default/ui/drawer\"\nimport { Input } from \"@/registry/default/ui/input\"\nimport { Label } from \"@/registry/default/ui/label\"\n\nexport default function DrawerDialogDemo() {\n const [open, setOpen] = React.useState(false)\n const isDesktop = useMediaQuery(\"(min-width: 768px)\")\n\n if (isDesktop) {\n return (\n \n \n \n \n \n \n Edit profile\n \n Make changes to your profile here. Click save when you're done.\n \n \n \n \n \n )\n }\n\n return (\n \n \n \n \n \n \n Edit profile\n \n Make changes to your profile here. Click save when you're done.\n \n \n \n \n \n \n \n \n \n \n )\n}\n\nfunction ProfileForm({ className }: React.ComponentProps<\"form\">) {\n return (\n
\n
\n \n \n
\n
\n \n \n
\n \n
\n )\n}\n", "type": "registry:example", "target": "" } ] }