@@ -4,7 +4,6 @@ import { useForm } from '@inertiajs/react';
44// Components
55import InputError from "@/components/input-error" ;
66import { Button } from "@/components/ui/button" ;
7- import { Alert , AlertDescription , AlertTitle } from "@/components/ui/alert"
87import { Input } from "@/components/ui/input" ;
98import { Label } from "@/components/ui/label" ;
109import { TriangleAlert } from 'lucide-react' ;
@@ -48,52 +47,58 @@ export default function DeleteUser() {
4847 title = "Delete Account"
4948 description = "Delete your account and all of its resources"
5049 />
51- < Dialog >
52- < DialogTrigger asChild >
53- < Button variant = "destructive" > Delete Account</ Button >
54- </ DialogTrigger >
55- < DialogContent >
56- < form className = "space-y-6" onSubmit = { deleteUser } >
57- < DialogHeader className = "space-y-3" >
58- < DialogTitle > Are you sure you want to delete your account?</ DialogTitle >
59- < DialogDescription >
60- Once your account is deleted, all of its resources and data will also be permanently deleted. Please enter your password to confirm you would like to permanently delete your account.
61- </ DialogDescription >
62- </ DialogHeader >
63- < div className = "grid gap-2" >
64- < Label htmlFor = "password" className = "sr-only" > Password</ Label >
50+ < div className = "border border-red-500 p-3 rounded-lg flex items-center bg-red-50" >
51+ < Dialog >
52+ < DialogTrigger asChild >
53+ < Button variant = "destructive" > Delete Account</ Button >
54+ </ DialogTrigger >
55+ < DialogContent >
56+ < form className = "space-y-6" onSubmit = { deleteUser } >
57+ < DialogHeader className = "space-y-3" >
58+ < DialogTitle > Are you sure you want to delete your account?</ DialogTitle >
59+ < DialogDescription >
60+ Once your account is deleted, all of its resources and data will also be permanently deleted. Please enter your password to confirm you would like to permanently delete your account.
61+ </ DialogDescription >
62+ </ DialogHeader >
63+ < div className = "grid gap-2" >
64+ < Label htmlFor = "password" className = "sr-only" > Password</ Label >
6565
66- < Input
67- id = "password"
68- type = "password"
69- name = "password"
70- ref = { passwordInput }
71- value = { data . password }
72- onChange = { ( e ) =>
73- setData ( 'password' , e . target . value )
74- }
75- placeholder = "Password"
76- />
66+ < Input
67+ id = "password"
68+ type = "password"
69+ name = "password"
70+ ref = { passwordInput }
71+ value = { data . password }
72+ onChange = { ( e ) =>
73+ setData ( 'password' , e . target . value )
74+ }
75+ placeholder = "Password"
76+ />
7777
78- < InputError message = { errors . password } />
79- </ div >
80-
81- < DialogFooter >
82- < DialogClose asChild >
83- < Button variant = "secondary" onClick = { closeModal } >
84- Cancel
85- </ Button >
86- </ DialogClose >
78+ < InputError message = { errors . password } />
79+ </ div >
80+
81+ < DialogFooter >
82+ < DialogClose asChild >
83+ < Button variant = "secondary" onClick = { closeModal } >
84+ Cancel
85+ </ Button >
86+ </ DialogClose >
8787
88- < Button variant = "destructive" disabled = { processing } asChild >
89- < button type = "submit" >
90- Delete Account
91- </ button >
92- </ Button >
93- </ DialogFooter >
94- </ form >
95- </ DialogContent >
96- </ Dialog >
88+ < Button variant = "destructive" disabled = { processing } asChild >
89+ < button type = "submit" >
90+ Delete Account
91+ </ button >
92+ </ Button >
93+ </ DialogFooter >
94+ </ form >
95+ </ DialogContent >
96+ </ Dialog >
97+ < div className = "relative text-red-600 ml-3" >
98+ < p className = "font-medium leading-none mb-1 text-sm" > Warning</ p >
99+ < p className = "leading-none text-xs" > Please proceed with caution, this cannot be undone</ p >
100+ </ div >
101+ </ div >
97102 </ div >
98103 ) ;
99104}
0 commit comments