import React from 'react';

interface Props {
  children: React.ReactNode;
  id: string;
  className?: string;
}

export function InputValidationText({
  children,
  id,
  className,
  ...rest
}: Props) {
  return (
    <div
      role="alert"
      id={id}
      className={`input-validation-text ${className}`}
      {...rest}
    >
      {children}
    </div>
  );
}

InputValidationText.defaultProps = {
  className: '',
};
