import { createMessageComponent } from '../../lib';
import Context from './Context';

/**
 * Invalid email message for a RegisterForm
 * Displayed if an invalid email address is entered into the form.
 * All props are passed down to SUI's `<Message>`
 * @param {Object} props - Props for SUI `<Message>`.
 * @returns {Object} component
 */
export const RegisterFormInvalidEmailMessage = createMessageComponent(
  'RegisterFormInvalidEmailMessage',
  Context,
  'error',
  'email',
  { error: true }
);

export default RegisterFormInvalidEmailMessage;
