18 lines
377 B
TypeScript
18 lines
377 B
TypeScript
"use client"
|
|
|
|
import { Slot } from "@radix-ui/react-slot"
|
|
|
|
import { buttonVariants } from "./variants"
|
|
|
|
import type { ButtonProps } from "./button"
|
|
|
|
export default function Button({
|
|
asChild = false,
|
|
className,
|
|
variant,
|
|
...props
|
|
}: ButtonProps) {
|
|
const Comp = asChild ? Slot : "button"
|
|
return <Comp className={buttonVariants({ className, variant })} {...props} />
|
|
}
|