25 lines
567 B
TypeScript
25 lines
567 B
TypeScript
"use client"
|
|
|
|
import { Button as ButtonPrimitive } from "@base-ui/react/button"
|
|
import { type VariantProps } from "class-variance-authority"
|
|
import { buttonVariants } from "./button-variants"
|
|
|
|
import { cn } from "@/lib/utils"
|
|
|
|
function Button({
|
|
className,
|
|
variant = "default",
|
|
size = "default",
|
|
...props
|
|
}: ButtonPrimitive.Props & VariantProps<typeof buttonVariants>) {
|
|
return (
|
|
<ButtonPrimitive
|
|
data-slot="button"
|
|
className={cn(buttonVariants({ variant, size, className }))}
|
|
{...props}
|
|
/>
|
|
)
|
|
}
|
|
|
|
export { Button, buttonVariants }
|