import React, { InputHTMLAttributes } from 'react'; interface InputProps extends InputHTMLAttributes { label?: string; error?: string; leftIcon?: React.ReactNode; rightIcon?: React.ReactNode; } const Input: React.FC = ({ label, error, placeholder, type = 'text', leftIcon, rightIcon, disabled, className = '', ...props }) => { return (
{label && ( )}
{leftIcon && (
{leftIcon}
)} {rightIcon && (
{rightIcon}
)}
{error && ( {error} )}
); }; export default Input;