Skip to main content
Version: Next

PasswordForgotContainer

Handles the case where the user forgets their password, and they want to request a password reset e-mail.

Usage#

import React from "react";
import {
PasswordForgotContainer,
PasswordForgotButton,
PasswordForgotEmail,
Alert,
} from "@pelcro/react-pelcro-js";
import "@pelcro/react-pelcro-js/dist/pelcro.css";
export const CustomPasswordForgotView = () => {
return (
<PasswordForgotContainer
onSuccess={(userObject) => {
console.log(userObject);
}}
onFailure={(err) => {
console.error(err.message);
}}
>
<Alert />
<PasswordForgotEmail label="E-mail" />
<PasswordForgotButton />
</PasswordForgotContainer>
);
};

Reference#

PasswordForgotContainer#

Props#

onSuccess#

(userObject) โ‡’ void

Callback function called when the password reset request is sent succesfully.

onFailure#

(errorObject) โ‡’ void

Callback function called when the password reset request fails.

Children components#

Alert#

Displays the relevant errors or success messages.


PasswordForgotEmail Required#

Instance of Input

Input field component to receive user's e-mail


PasswordForgotButton Required#

Instance of Button

A button component that submits the form.

Props#

name#

string?

The title displayed inside the button