This commit is contained in:
Vula Builder
2026-06-04 11:45:19 +00:00
parent d51ad0ed42
commit 1f2ff638f8
+26
View File
@@ -0,0 +1,26 @@
'use client'
import { cn } from "@/lib/utils"
import React from "react"
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
error?: string
}
export default function Input({ className, error, ...props }: InputProps) {
return (
<div className="w-full">
<input
className={cn(
"flex h-10 w-full rounded-md border border-border bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-[#ea580c]/50 focus:border-[#ea580c] disabled:cursor-not-allowed disabled:opacity-50",
error && "border-red-500 focus:ring-red-500/50",
className
)}
{...props}
/>
{error && (
<p className="mt-1 text-sm text-red-500">{error}</p>
)}
</div>
)
}