feat: refactor Button and Input components to use Headless UI
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Field, Label, Input as UIInput } from '@headlessui/react'
|
||||
import { Field, Label, Input as HeadlessInput } from '@headlessui/react'
|
||||
import { useState, type ComponentProps, type ReactNode } from 'react'
|
||||
import {
|
||||
get,
|
||||
@@ -55,7 +55,7 @@ export const Input = <TFormValues extends Record<string, unknown>>(
|
||||
<Label className="mb-1 block text-gray-700">
|
||||
{label} {error && <span className="text-red-500">{error.message}</span>}
|
||||
</Label>
|
||||
<UIInput
|
||||
<HeadlessInput
|
||||
type={inputType}
|
||||
className="h-[42px] w-full rounded-md border border-[#DFDFDF] p-2"
|
||||
placeholder={inputType === 'password' ? '******' : placeholder}
|
||||
|
||||
Reference in New Issue
Block a user