feat: refactor Button and Input components to use Headless UI
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { Button as HeadlessButton } from '@headlessui/react'
|
||||
import { cva, type VariantProps } from 'class-variance-authority'
|
||||
import type { ReactNode, ElementType, ComponentPropsWithoutRef } from 'react'
|
||||
import { twMerge } from 'tailwind-merge'
|
||||
@@ -52,7 +53,7 @@ export const Button = <C extends ElementType = 'button'>({
|
||||
className,
|
||||
...properties
|
||||
}: ButtonProperties<C>) => {
|
||||
const Component = as || 'button'
|
||||
const Component = as || HeadlessButton
|
||||
const classes = twMerge(buttonVariants({ variant, size, className }))
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user