aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/packages/ui-new/src/components/ui/button.tsx
diff options
context:
space:
mode:
author苏向夜 <fu050409@163.com>2026-02-18 15:08:40 +0800
committer苏向夜 <fu050409@163.com>2026-02-18 15:08:40 +0800
commit1a103de2f1ef75cd73347953cbe27e14606df871 (patch)
treeeecb01f025bd9941aaa42ccebee02109cb5c7942 /packages/ui-new/src/components/ui/button.tsx
parent2c3de3ac5ab1ab59f7245ab9cbdfda9b4e96dcb0 (diff)
downloadDropOut-1a103de2f1ef75cd73347953cbe27e14606df871.tar.gz
DropOut-1a103de2f1ef75cd73347953cbe27e14606df871.zip
refactor(client): rewrite macros to generate client
Diffstat (limited to 'packages/ui-new/src/components/ui/button.tsx')
-rw-r--r--packages/ui-new/src/components/ui/button.tsx20
1 files changed, 10 insertions, 10 deletions
diff --git a/packages/ui-new/src/components/ui/button.tsx b/packages/ui-new/src/components/ui/button.tsx
index 37a7d4b..be181b0 100644
--- a/packages/ui-new/src/components/ui/button.tsx
+++ b/packages/ui-new/src/components/ui/button.tsx
@@ -1,8 +1,8 @@
-import * as React from "react"
-import { Slot } from "@radix-ui/react-slot"
-import { cva, type VariantProps } from "class-variance-authority"
+import { Slot } from "@radix-ui/react-slot";
+import { cva, type VariantProps } from "class-variance-authority";
+import type * as React from "react";
-import { cn } from "@/lib/utils"
+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 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
@@ -33,8 +33,8 @@ const buttonVariants = cva(
variant: "default",
size: "default",
},
- }
-)
+ },
+);
function Button({
className,
@@ -44,9 +44,9 @@ function Button({
...props
}: React.ComponentProps<"button"> &
VariantProps<typeof buttonVariants> & {
- asChild?: boolean
+ asChild?: boolean;
}) {
- const Comp = asChild ? Slot : "button"
+ const Comp = asChild ? Slot : "button";
return (
<Comp
@@ -56,7 +56,7 @@ function Button({
className={cn(buttonVariants({ variant, size, className }))}
{...props}
/>
- )
+ );
}
-export { Button, buttonVariants }
+export { Button, buttonVariants };