import React from 'react';

function ErrorText({ children, styleClass }) {
    const defaultClasses = "p-3 bg-red-100 text-red-600 rounded-lg text-sm font-medium border border-red-300 break-words whitespace-normal";

    return (
        <>
            {children && (
                <p className={`${defaultClasses} ${styleClass || ""}`}>
                    {children}
                </p>
            )}
        </>
    );
}

export default ErrorText;
