diff --git a/apps/web/src/components/forms/profile.tsx b/apps/web/src/components/forms/profile.tsx index 0ce5c7f3d..78da0f636 100644 --- a/apps/web/src/components/forms/profile.tsx +++ b/apps/web/src/components/forms/profile.tsx @@ -10,7 +10,20 @@ import type { User } from '@documenso/prisma/client'; import { TRPCClientError } from '@documenso/trpc/client'; import { trpc } from '@documenso/trpc/react'; import { cn } from '@documenso/ui/lib/utils'; +import { Alert, AlertDescription } from '@documenso/ui/primitives/alert'; +import { + AlertDialog, + AlertDialogAction, + AlertDialogCancel, + AlertDialogContent, + AlertDialogDescription, + AlertDialogFooter, + AlertDialogHeader, + AlertDialogTitle, + AlertDialogTrigger, +} from '@documenso/ui/primitives/alert-dialog'; import { Button } from '@documenso/ui/primitives/button'; +import { Card, CardContent, CardFooter } from '@documenso/ui/primitives/card'; import { Form, FormControl, @@ -133,10 +146,55 @@ export const ProfileForm = ({ className, user }: ProfileFormProps) => { /> - + +
+ + + + Delete your account and all its contents, including completed documents. This action is + irreversible and will cancel your subscription, so proceed with caution. + + + + + + + + + Delete Account + + Documenso will delete{' '} + all of your documents, along with all of + your completed documents, signatures, and all other resources belonging to your + Account. + + + + + Cancel + + Delete Account + + + + + + +
); }; + +export function AlertDestructive() { + return ( + + + This action is not reversible. Please be certain. + + + ); +} diff --git a/packages/ui/primitives/alert.tsx b/packages/ui/primitives/alert.tsx index 190f7781d..5409152b7 100644 --- a/packages/ui/primitives/alert.tsx +++ b/packages/ui/primitives/alert.tsx @@ -1,6 +1,7 @@ import * as React from 'react'; -import { VariantProps, cva } from 'class-variance-authority'; +import { cva } from 'class-variance-authority'; +import type { VariantProps } from 'class-variance-authority'; import { cn } from '../lib/utils';