Deploy
This commit is contained in:
@@ -0,0 +1,27 @@
|
|||||||
|
'use client'
|
||||||
|
|
||||||
|
import { cn } from "@/lib/utils"
|
||||||
|
|
||||||
|
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
||||||
|
label?: string
|
||||||
|
error?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function Input({ className, label, error, ...props }: InputProps) {
|
||||||
|
return (
|
||||||
|
<div className="flex flex-col gap-1">
|
||||||
|
{label && (
|
||||||
|
<label className="text-sm text-[#e7e7ee]/80 font-medium">{label}</label>
|
||||||
|
)}
|
||||||
|
<input
|
||||||
|
className={cn(
|
||||||
|
"w-full rounded-md border border-[#303040] bg-[#0f0f17] px-3 py-2 text-[#e7e7ee] placeholder:text-[#e7e7ee]/40 focus:outline-none focus:border-[#c0c0c0] focus:ring-1 focus:ring-[#c0c0c0] transition-colors",
|
||||||
|
error && "border-red-500 focus:border-red-500 focus:ring-red-500",
|
||||||
|
className
|
||||||
|
)}
|
||||||
|
{...props}
|
||||||
|
/>
|
||||||
|
{error && <p className="text-xs text-red-500">{error}</p>}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user