Skip to main content
Version: 1.0.0

PasswordResetModal

The password reset modal is usually shown when the user clicks on the password reset link sent to them after they request it using the PasswordForgotModal.

Loading...

Usage#

import React from "react";
import {
PasswordResetModal,
PelcroModalController,
usePelcro,
} from "@pelcro/react-pelcro-js";
import "@pelcro/react-pelcro-js/dist/pelcro.css";
export const PasswordResetExample = () => {
const { switchView } = usePelcro();
return (
<>
<button onClick={() => switchView("password-reset")}>
Forgot your password? click here
</button>
<PelcroModalController>
<PasswordResetModal />
</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 is reset succesfully.

onFailure#

(errorObject) โ‡’ void

Callback function called when the password reset fails.