Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

Fix deletion color

Bill Yang7b49279b7d89
diff --git a/client/src/components/SiteSettings/SiteSettings.tsx b/client/src/components/SiteSettings/SiteSettings.tsx
index 77c61c97a..e7276269c 100644
--- a/client/src/components/SiteSettings/SiteSettings.tsx
+++ b/client/src/components/SiteSettings/SiteSettings.tsx
@@ -179,7 +179,7 @@ export function SiteSettingsInner({
<AlertDialogAction
onClick={handleDelete}
disabled={isDeleting}
- className="bg-red-500 hover:bg-red-600"
+ variant="destructive"
>
{isDeleting ? "Deleting..." : "Yes, delete site"}
</AlertDialogAction>
diff --git a/client/src/components/ui/alert-dialog.tsx b/client/src/components/ui/alert-dialog.tsx
index 661167b2b..5ce8f099e 100644
--- a/client/src/components/ui/alert-dialog.tsx
+++ b/client/src/components/ui/alert-dialog.tsx
@@ -100,11 +100,21 @@ AlertDialogDescription.displayName =
const AlertDialogAction = React.forwardRef<
React.ElementRef<typeof AlertDialogPrimitive.Action>,
- React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>
->(({ className, ...props }, ref) => (
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action> & {
+ variant?:
+ | "default"
+ | "destructive"
+ | "outline"
+ | "secondary"
+ | "ghost"
+ | "link"
+ | "accent"
+ | "warning";
+ }
+>(({ className, variant = "default", ...props }, ref) => (
<AlertDialogPrimitive.Action
ref={ref}
- className={cn(buttonVariants(), className)}
+ className={cn(buttonVariants({ variant }), className)}
{...props}
/>
));