15 lines
616 B
TypeScript
15 lines
616 B
TypeScript
import { forwardRef, type InputHTMLAttributes, type TextareaHTMLAttributes } from 'react'
|
|
import { cn } from '../../lib/utils'
|
|
|
|
export const Input = forwardRef<HTMLInputElement, InputHTMLAttributes<HTMLInputElement>>(
|
|
({ className, ...props }, ref) => <input ref={ref} className={cn('an-input', className)} {...props} />,
|
|
)
|
|
|
|
Input.displayName = 'Input'
|
|
|
|
export const Textarea = forwardRef<HTMLTextAreaElement, TextareaHTMLAttributes<HTMLTextAreaElement>>(
|
|
({ className, ...props }, ref) => <textarea ref={ref} className={cn('an-input an-textarea', className)} {...props} />,
|
|
)
|
|
|
|
Textarea.displayName = 'Textarea'
|