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

/**
 * Invalid email message for a LoginForm
 * 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 LoginFormInvalidEmailMessage = createMessageComponent(
  'LoginFormInvalidEmailMessage',
  Context,
  'error',
  'email',
  { error: true }
);

export default LoginFormInvalidEmailMessage;
