Skip to content
Source
Sign inSign up
TanStack/form
Open History to see the last commit

Button.tsx

22 lines547 Bytes

1import * as React from 'react'
2​
3import { type buttonVariantProps, buttonVariants } from './variants'
4​
5type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> &
6 buttonVariantProps
7​
8const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
9 ({ className, base = true, variant, size, ...props }, ref) => {
10 return (
11 <button
12 className={buttonVariants({ className, base, variant, size })}
13 ref={ref}
14 {...props}
15 />
16 )
17 },
19​
20Button.displayName = 'Button'
21​
22export { Button, type ButtonProps }