import * as React from 'react'; import { cn } from '@/lib/utils'; export interface InputProps extends React.InputHTMLAttributes { icon?: React.ReactNode; label?: string; /** Error message to display below the input */ error?: string; } import { Search } from 'lucide-react'; import { Label } from './label'; import { FileUpload as BaseFileUpload } from './file-upload'; const Input = React.forwardRef( ({ className, type, icon, label, error, id, ...props }, ref) => { const errorId = React.useId(); return (
{label && }
{icon && (
{icon}
)}
{error && (

{error}

)}
); } ); Input.displayName = 'Input'; const SearchInput = React.forwardRef( (props, ref) => } /> ); SearchInput.displayName = 'SearchInput'; // Shim for legacy FileUpload usage const FileUpload = (props: any) => (
{ }} {...props} />
); export { Input, SearchInput, FileUpload };