From 5f0f642ab679e2c9002d467fc9e5e3f565a62fd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=BF=94?= Date: Mon, 23 Feb 2026 00:10:45 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=9B=B4=E6=96=B0=20Badge=20?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E4=B8=BA=E5=8C=BB=E7=96=97=E5=81=A5=E5=BA=B7?= =?UTF-8?q?=E9=A3=8E=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ui/badge.tsx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/components/ui/badge.tsx b/src/components/ui/badge.tsx index eee9da9..4bd9ebe 100644 --- a/src/components/ui/badge.tsx +++ b/src/components/ui/badge.tsx @@ -5,20 +5,21 @@ import { cva, type VariantProps } from "class-variance-authority" import { cn } from "@/lib/utils" const badgeVariants = cva( - "inline-flex items-center justify-center rounded-full border px-3 py-1 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-[var(--color-tech-blue)] focus-visible:ring-2 focus-visible:ring-[var(--color-tech-blue)]/50 transition-all duration-300 overflow-hidden", + "inline-flex items-center justify-center rounded-full border px-3 py-1 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-[#005EB8] focus-visible:ring-2 focus-visible:ring-[#005EB8]/50 transition-all duration-300 overflow-hidden", { variants: { variant: { - default: "bg-gradient-to-r from-[var(--color-tech-blue)] to-[var(--color-tech-purple)] text-white border-transparent shadow-lg shadow-[var(--color-tech-blue)]/30", + default: "bg-[#C41E3A] text-white border-transparent shadow-sm", secondary: - "bg-[var(--color-bg-tertiary)] text-gray-300 border-gray-700 hover:border-[var(--color-tech-blue)] hover:text-[var(--color-tech-blue)]", + "bg-[#005EB8] text-white border-transparent shadow-sm", destructive: - "bg-red-600 text-white border-transparent hover:bg-red-700", + "bg-[#DC2626] text-white border-transparent hover:bg-[#B91C1C]", outline: - "border-[var(--color-tech-blue)] text-[var(--color-tech-blue)] hover:bg-[var(--color-tech-blue)]/10 hover:shadow-lg hover:shadow-[var(--color-tech-blue)]/20", - ghost: "text-gray-400 hover:text-[var(--color-tech-blue)] hover:bg-[var(--color-bg-tertiary)]", - success: "bg-green-600 text-white border-transparent hover:bg-green-700", - warning: "bg-yellow-600 text-white border-transparent hover:bg-yellow-700", + "border-[#005EB8] text-[#005EB8] bg-transparent hover:bg-[#E8F4FD]", + ghost: "text-[#718096] hover:text-[#005EB8] hover:bg-[#F5F7FA]", + success: "bg-[#16A34A] text-white border-transparent hover:bg-[#15803D]", + warning: "bg-[#D97706] text-white border-transparent hover:bg-[#B45309]", + info: "bg-[#0284C7] text-white border-transparent hover:bg-[#0369A1]", }, }, defaultVariants: {