Files
web/components/TempDesignSystem/Button/index.tsx
2024-04-02 13:43:23 +02:00

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} />
}