import * as React from 'react';

interface IFormFieldInputProps {
    input: JSX.Element | string | Array<JSX.Element | string>;
}

export const FormFieldInput = ({ input, ...rest }: IFormFieldInputProps) => {
    if (typeof input === 'string') {
        return (
            <span {...rest}>
                {input}
            </span>
        );
    }

    return <>{input}</>;
};
