From 37cbaa42835f090de2c087d613f9c9f9677c93d8 Mon Sep 17 00:00:00 2001 From: Jeff Gu Date: Sun, 12 Apr 2026 17:15:13 +0800 Subject: [PATCH] =?UTF-8?q?style(ui):=20=E4=BC=98=E5=8C=96=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E6=A0=B7=E5=BC=8F=E5=92=8C=E4=BB=A3=E7=A0=81=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/ui/button.tsx | 48 +++--- frontend/src/components/ui/card.tsx | 2 +- frontend/src/components/ui/dialog.tsx | 2 +- frontend/src/components/ui/input.tsx | 18 +- frontend/src/components/ui/select.tsx | 2 +- frontend/src/components/ui/textarea.tsx | 2 +- frontend/src/index.css | 20 +-- frontend/src/pages/Channels.tsx | 2 +- frontend/src/pages/Pricing.tsx | 216 ++++++++++++------------ 9 files changed, 152 insertions(+), 160 deletions(-) diff --git a/frontend/src/components/ui/button.tsx b/frontend/src/components/ui/button.tsx index a24c7a8..bdc82fc 100644 --- a/frontend/src/components/ui/button.tsx +++ b/frontend/src/components/ui/button.tsx @@ -1,23 +1,20 @@ -import * as React from "react" -import { Slot } from "@radix-ui/react-slot" -import { cva, type VariantProps } from "class-variance-authority" -import { cn } from "@/lib/utils" +import * as React from "react"; +import { Slot } from "@radix-ui/react-slot"; +import { cva, type VariantProps } from "class-variance-authority"; +import { cn } from "@/lib/utils"; const buttonVariants = cva( "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all duration-200 focus-visible:outline-none focus-visible:shadow-md disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer active:scale-[0.97] [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", { variants: { variant: { - default: "bg-primary text-primary-foreground shadow-sm hover:bg-primary/90 hover:shadow-md", - destructive: - "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90", - outline: - "border border-input shadow-sm hover:bg-accent hover:text-accent-foreground hover:border-accent-foreground/20", - secondary: - "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80", + default: "bg-primary text-primary-foreground hover:bg-primary/90 hover:shadow-md", + destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90", + outline: "border border-input hover:bg-accent hover:text-accent-foreground hover:border-accent-foreground/20", + secondary: "border border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80", ghost: "hover:bg-accent hover:text-accent-foreground", link: "text-primary underline-offset-4 hover:underline", - success: "bg-success text-success-foreground shadow-sm hover:bg-success/90", + success: "bg-success text-success-foreground hover:bg-success/90", }, size: { default: "h-10 px-4 py-2", @@ -30,27 +27,20 @@ const buttonVariants = cva( variant: "default", size: "default", }, - } -) + }, +); export interface ButtonProps - extends React.ButtonHTMLAttributes, - VariantProps { - asChild?: boolean + extends React.ButtonHTMLAttributes, VariantProps { + asChild?: boolean; } const Button = React.forwardRef( ({ className, variant, size, asChild = false, ...props }, ref) => { - const Comp = asChild ? Slot : "button" - return ( - - ) - } -) -Button.displayName = "Button" + const Comp = asChild ? Slot : "button"; + return ; + }, +); +Button.displayName = "Button"; -export { Button, buttonVariants } +export { Button, buttonVariants }; diff --git a/frontend/src/components/ui/card.tsx b/frontend/src/components/ui/card.tsx index d273e8b..e2ed5f4 100644 --- a/frontend/src/components/ui/card.tsx +++ b/frontend/src/components/ui/card.tsx @@ -8,7 +8,7 @@ const Card = React.forwardRef<
>( ({ className, type, ...props }, ref) => { @@ -7,15 +7,15 @@ const Input = React.forwardRef>( - ) - } -) -Input.displayName = "Input" + ); + }, +); +Input.displayName = "Input"; -export { Input } +export { Input }; diff --git a/frontend/src/components/ui/select.tsx b/frontend/src/components/ui/select.tsx index db2b2e9..9fd1d0d 100644 --- a/frontend/src/components/ui/select.tsx +++ b/frontend/src/components/ui/select.tsx @@ -18,7 +18,7 @@ interface SelectOption { } const TRIGGER_BASE_CLASS = - 'group relative flex h-10 w-full items-center rounded-md border border-input bg-transparent px-3 py-2 pr-10 text-sm text-foreground shadow-sm outline-none transition-all duration-200 hover:border-muted-foreground/30 focus-visible:border-primary/50 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50' + 'group relative flex h-10 w-full items-center rounded-md border border-input bg-transparent px-3 py-2 pr-10 text-sm text-foreground transition-all duration-200 hover:border-muted-foreground/30 focus-visible:border-primary/50 disabled:cursor-not-allowed disabled:opacity-50' const CONTENT_BASE_CLASS = 'absolute z-50 mt-1 w-full overflow-hidden rounded-md border border-border bg-popover text-popover-foreground shadow-lg' diff --git a/frontend/src/components/ui/textarea.tsx b/frontend/src/components/ui/textarea.tsx index c9abfbd..befd111 100644 --- a/frontend/src/components/ui/textarea.tsx +++ b/frontend/src/components/ui/textarea.tsx @@ -8,7 +8,7 @@ const Textarea = React.forwardRef< return (