/* eslint-disable no-ternary, max-lines-per-function */ import { ErrorText, InfoText, Input, Label, LoadingWrapper, SuccessText, Wrapper } from "./styled" import { ForwardedRef, forwardRef } from "react" import { ComponentProps } from "." import Loading from "components/Loading" const InputText = forwardRef( ( { className, defaultValue, disabled, error, errorText, hasContent, infoText, inputId, inputProps, isFullBorder, label, labelId, loading, max, min, name, onBlur, onChange, onInput, onKeyDown, required, size, step, success, successText, type = "text", value }: ComponentProps, ref: ForwardedRef ) => ( {loading ? ( ) : null} {errorText ? {errorText} : null} {infoText ? {infoText} : null} {successText ? ( {successText} ) : null} ) ) InputText.displayName = "InputText" export default InputText