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

/**
 * Invalid credentials message for a LoginForm
 * Displayed if login fails with the provided credentials.
 * All props are passed down to SUI's `<Message>`
 * @param {Object} props - Props for SUI `<Message>`.
 * @returns {Object} component
 */
export const LoginFormInvalidCredentialsMessage = createMessageComponent(
  'LoginFormInvalidCredentialsMessage',
  Context,
  'error',
  'credentials',
  { error: true }
);

export default LoginFormInvalidCredentialsMessage;
