import React from "react"; interface InputCompOneProps { label: string; labelClass: string; placeholder?: string; value: string; onChange: (e: React.ChangeEvent) => void; onInput?: (e: React.FormEvent) => void; name: string; tabIndex?: number; ref?: React.RefObject; selectValue?: string; labelSpan?: string; labelSpanClass?: string; parentInputClass?: string; inputClass?: string; parentSelectClass?: string; selectClass?: string; input?: boolean; select?: boolean; inputType?: string; selectOptions?: { value: string; label: string }[]; icon?: string | React.ReactNode; // Type for the icon } const InputCompOne: React.FC = ({ label, labelClass, labelSpan, labelSpanClass, placeholder = "Placeholder", value, onChange, onInput, name, tabIndex, ref, selectValue, input, select, inputType = "text", selectOptions, icon, selectClass, inputClass, parentInputClass, parentSelectClass, }) => { return (
{label && ( )} {input && (
{icon && (
{typeof icon === "string" ? icon : icon}
)}
)} {select && (
)}
); }; export default InputCompOne;