Skip to main content
Version: 2.0.0

PasswordForgotModal

The password forgot modal is used when the user forgets their password, and they want to request a password reset e-mail.

Loading...

Usage#

import React from "react";
import {
PasswordForgotModal,
PelcroModalController,
usePelcro,
} from "@pelcro/react-pelcro-js";
import "@pelcro/react-pelcro-js/dist/pelcro.css";
export const PasswordForgotExample = () => {
const { switchView } = usePelcro();
return (
<>
<button onClick={() => switchView("password-forgot")}>
Forgot your password? click here
</button>
<PelcroModalController>
<PasswordForgotModal />
</PelcroModalController>
</>
);
};

Reference#

Props#

onDisplay#

() โ‡’ void

Callback function called when the modal is first displayed.

onClose#

() โ‡’ void

Callback function called when the modal is closed.

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.