Files
vula-20fcd39d/src/components/ui/Input.tsx
T
Vula Builder 02a2416b8f Deploy
2026-07-27 17:10:25 +00:00

26 lines
784 B
TypeScript

'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="relative">
<input
className={cn(
"flex h-10 w-full rounded-md border border-[#e7eaef] bg-white px-3 py-2 text-sm text-[#101418] placeholder:text-[#101418]/50 focus:outline-none focus:border-[#18181b] focus:ring-0 disabled:cursor-not-allowed disabled:opacity-50",
error && "border-red-500 focus:border-red-500",
className
)}
{...props}
/>
{error && (
<p className="mt-1 text-xs text-red-500">{error}</p>
)}
</div>
)
}