Skip to content

A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search

fix(web): adopt shadcn v4 destructive colors (#3170)

Mohamed Bassem045d7c1838f5
diff --git a/apps/web/components/settings/DeleteAccount.tsx b/apps/web/components/settings/DeleteAccount.tsx
index cf2ad60a..90f52b57 100644
--- a/apps/web/components/settings/DeleteAccount.tsx
+++ b/apps/web/components/settings/DeleteAccount.tsx
@@ -190,7 +190,7 @@ export function DeleteAccount() {
</ActionButton>
)}
>
- <Button variant="destructive" className="w-full">
+ <Button variant="destructiveOutline">
<Trash2 className="mr-2 h-4 w-4" />
Delete Account
</Button>
diff --git a/apps/web/components/ui/alert.tsx b/apps/web/components/ui/alert.tsx
index 706b711e..53737c1b 100644
--- a/apps/web/components/ui/alert.tsx
+++ b/apps/web/components/ui/alert.tsx
@@ -10,7 +10,7 @@ const alertVariants = cva(
variant: {
default: "bg-background text-foreground",
destructive:
- "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",
+ "border-destructive/50 text-destructive [&>svg]:text-destructive",
},
},
defaultVariants: {
diff --git a/apps/web/components/ui/badge.tsx b/apps/web/components/ui/badge.tsx
index ac592b89..002c196b 100644
--- a/apps/web/components/ui/badge.tsx
+++ b/apps/web/components/ui/badge.tsx
@@ -13,7 +13,7 @@ const badgeVariants = cva(
secondary:
"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
destructive:
- "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
+ "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80 dark:bg-destructive/60",
outline: "text-foreground",
},
},
diff --git a/packages/shared-react/components/ui/button.tsx b/packages/shared-react/components/ui/button.tsx
index 287c40c0..a6c0ef59 100644
--- a/packages/shared-react/components/ui/button.tsx
+++ b/packages/shared-react/components/ui/button.tsx
@@ -12,9 +12,9 @@ const buttonVariants = cva(
none: "",
default: "bg-primary text-primary-foreground hover:bg-primary/90",
destructive:
- "bg-destructive text-destructive-foreground hover:bg-destructive/90",
+ "bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",
destructiveOutline:
- "border border-destructive bg-transparent text-destructive hover:bg-destructive/90 hover:text-destructive-foreground",
+ "border border-destructive bg-transparent text-destructive hover:bg-destructive/90 hover:text-destructive-foreground dark:hover:bg-destructive/60",
outline:
"border border-input bg-background hover:bg-accent hover:text-accent-foreground",
secondary:
@@ -22,7 +22,7 @@ const buttonVariants = cva(
ghost:
"hover:bg-accent hover:text-accent-foreground focus-visible:ring-0",
ghostDestructive:
- "text-destructive hover:bg-destructive/10 hover:text-destructive focus-visible:ring-0",
+ "text-destructive hover:bg-destructive/10 hover:text-destructive focus-visible:ring-0 dark:hover:bg-destructive/20",
border: "border border-input hover:bg-accent",
link: "text-primary underline-offset-4 hover:underline",
},
diff --git a/tooling/tailwind/globals.css b/tooling/tailwind/globals.css
index b7369bd5..36d8cae7 100644
--- a/tooling/tailwind/globals.css
+++ b/tooling/tailwind/globals.css
@@ -25,7 +25,7 @@
--accent: 210 40% 96.1%;
--accent-foreground: 222.2 47.4% 11.2%;
- --destructive: 0 84.2% 60.2%;
+ --destructive: 357.2 100% 45.3%;
--destructive-foreground: 210 40% 98%;
--border: 214.3 31.8% 91.4%;
@@ -57,7 +57,7 @@
--accent: 217.2 32.6% 17.5%;
--accent-foreground: 210 40% 98%;
- --destructive: 0 80% 45%;
+ --destructive: 358.7 100% 69.6%;
--destructive-foreground: 210 40% 98%;
--border: 217.2 32.6% 17.5%;