{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "modals-05", "description": "Upload files modal with drag and drop", "registryDependencies": [ "dialog", "button", "card" ], "files": [ { "path": "creative-tim/blocks/modals-05/page.tsx", "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { CloudUpload, Trash, X } from \"lucide-react\"\n\nimport { Button } from \"@/components/ui/button\"\nimport { Card, CardContent } from \"@/components/ui/card\"\nimport {\n Dialog,\n DialogContent,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"@/components/ui/dialog\"\n\nconst IMAGES = [\n {\n name: \"cover-1.jpg\",\n size: \"140 KB\",\n },\n {\n name: \"cover-2.jpg\",\n size: \"288 KB\",\n },\n]\n\nexport default function ModalsBlock() {\n const [isOpen, setIsOpen] = React.useState(false)\n\n return (\n
\n \n \n \n \n \n setIsOpen(false)}\n className=\"ring-offset-background focus:ring-ring absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none\"\n >\n \n Close\n \n \n Upload Files\n

\n Easily upload files to your account with just a few clicks.\n

\n
\n\n
\n \n \n \n \n \n\n
\n {IMAGES.map(({ name, size }) => (\n \n \n
\n \n
\n

{name}

\n

{size}

\n
\n
\n \n \n \n
\n
\n ))}\n
\n\n
\n setIsOpen(false)}\n >\n Cancel\n \n \n
\n
\n
\n
\n
\n )\n}\n", "type": "registry:page", "target": "app/modals-05/page.tsx" } ], "meta": { "iframeHeight": "700px", "container": "w-full bg-surface", "mobile": "component" }, "categories": [ "modals" ], "type": "registry:block" }