This commit is contained in:
Vula Builder
2026-07-15 09:25:24 +00:00
parent 7afabcf7f6
commit 508a2c849c
+30
View File
@@ -0,0 +1,30 @@
'use client'
import { cn } from "@/lib/utils"
import { forwardRef } from "react"
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
error?: boolean
}
const Input = forwardRef<HTMLInputElement, InputProps>(
({ className, type, error, ...props }, ref) => {
return (
<input
type={type}
className={cn(
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:border-primary focus-visible:ring-0 disabled:cursor-not-allowed disabled:opacity-50",
error && "border-destructive text-destructive focus-visible:border-destructive",
className
)}
ref={ref}
aria-invalid={error ? "true" : undefined}
{...props}
/>
)
}
)
Input.displayName = "Input"
export default Input