{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "delete-user", "dependencies": [ "@inertiajs/react" ], "registryDependencies": [ "@craft/heading", "@craft/input-error", "@craft/password-input", "button", "dialog", "label" ], "files": [ { "path": "registry/new-york-v4/components/delete-user.tsx", "content": "import { Form } from \"@inertiajs/react\";\nimport { useRef } from \"react\";\nimport ProfileController from \"@/actions/App/Http/Controllers/Settings/ProfileController\";\nimport Heading from \"@/components/heading\";\nimport InputError from \"@/components/input-error\";\nimport PasswordInput from \"@/components/password-input\";\nimport { Button } from \"@/components/ui/button\";\nimport { toastFirstFormError } from \"@/lib/form-errors\";\nimport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogTitle,\n DialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { Label } from \"@/components/ui/label\";\n\nexport default function DeleteUser() {\n const passwordInput = useRef(null);\n\n return (\n
\n \n
\n
\n

Warning

\n

Please proceed with caution, this cannot be undone.

\n
\n\n \n }\n >\n Delete account\n \n \n Are you sure you want to delete your account?\n \n Once your account is deleted, all of its resources and data will also be\n permanently deleted. Please enter your password to confirm you would\n like to permanently delete your account.\n \n\n {\n toastFirstFormError(errors);\n passwordInput.current?.focus();\n }}\n resetOnSuccess\n className=\"space-y-6\"\n >\n {({ resetAndClearErrors, processing, errors }) => (\n <>\n
\n \n\n \n\n \n
\n\n \n resetAndClearErrors()}\n />\n }\n >\n Cancel\n \n\n \n Delete account\n \n \n \n )}\n \n
\n
\n
\n
\n );\n}\n", "type": "registry:component" } ], "type": "registry:component" }