"use client"
import { Slot } from "@radix-ui/react-slot"
import { Button as ButtonRAC } from "react-aria-components"
import { buttonVariants } from "./variants"
import type { ButtonProps } from "./button"
export default function Button(props: ButtonProps) {
const {
className,
intent,
size,
theme,
fullWidth,
wrapping,
variant,
...restProps
} = props
const classNames = buttonVariants({
className,
intent,
size,
theme,
fullWidth,
wrapping,
variant,
})
if (restProps.asChild) {
const { asChild, ...slotProps } = restProps
return
}
const { asChild, onClick, disabled, ...racProps } = restProps
return (
)
}