/** * Input Component * Reusable text input with validation states */ import React, { InputHTMLAttributes, ReactNode } from 'react'; export interface InputProps extends InputHTMLAttributes { label?: string; error?: string; helperText?: string; icon?: ReactNode; fullWidth?: boolean; } export const Input: React.FC = ({ label, error, helperText, icon, fullWidth = false, className = '', ...props }) => { const inputStyles = ` w-full px-4 py-2 bg-gray-900 border rounded-lg text-gray-100 placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-purple-500 transition-all duration-200 ${error ? 'border-red-500' : 'border-gray-700'} ${icon ? 'pl-10' : ''} ${className} `; return (
{label && ( )}
{icon && (
{icon}
)}
{error && (

{error}

)} {helperText && !error && (

{helperText}

)}
); };