Merge remote-tracking branch 'origin/master' into feature/slicing
This commit is contained in:
commit
06c8fb8535
@ -1,3 +1,4 @@
|
|||||||
|
import { Button as HeadlessButton } from '@headlessui/react'
|
||||||
import { cva, type VariantProps } from 'class-variance-authority'
|
import { cva, type VariantProps } from 'class-variance-authority'
|
||||||
import type { ReactNode, ElementType, ComponentPropsWithoutRef } from 'react'
|
import type { ReactNode, ElementType, ComponentPropsWithoutRef } from 'react'
|
||||||
import { twMerge } from 'tailwind-merge'
|
import { twMerge } from 'tailwind-merge'
|
||||||
@ -52,7 +53,7 @@ export const Button = <C extends ElementType = 'button'>({
|
|||||||
className,
|
className,
|
||||||
...properties
|
...properties
|
||||||
}: ButtonProperties<C>) => {
|
}: ButtonProperties<C>) => {
|
||||||
const Component = as || 'button'
|
const Component = as || HeadlessButton
|
||||||
const classes = twMerge(buttonVariants({ variant, size, className }))
|
const classes = twMerge(buttonVariants({ variant, size, className }))
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@ -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 { useState, type ComponentProps, type ReactNode } from 'react'
|
||||||
import {
|
import {
|
||||||
get,
|
get,
|
||||||
@ -55,7 +55,7 @@ export const Input = <TFormValues extends Record<string, unknown>>(
|
|||||||
<Label className="mb-1 block text-gray-700">
|
<Label className="mb-1 block text-gray-700">
|
||||||
{label} {error && <span className="text-red-500">{error.message}</span>}
|
{label} {error && <span className="text-red-500">{error.message}</span>}
|
||||||
</Label>
|
</Label>
|
||||||
<UIInput
|
<HeadlessInput
|
||||||
type={inputType}
|
type={inputType}
|
||||||
className="h-[42px] w-full rounded-md border border-[#DFDFDF] p-2"
|
className="h-[42px] w-full rounded-md border border-[#DFDFDF] p-2"
|
||||||
placeholder={inputType === 'password' ? '******' : placeholder}
|
placeholder={inputType === 'password' ? '******' : placeholder}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user