PasswordForm

<PasswordForm
onCancel={() => console.log('cancel')}
showCurrentPasswordField
onSubmit={console.log}
/>

Props

PropTypeDefaultDescription
currentPasswordErrorTextstringSetting this will create an error just below the current password field with this text content
errorTextstringSetting this will create an error alert just above the buttons with this text content
loadingbooleanfalseSets the loading state of the form
onCancelfunctionnullMakes cancel button visible and triggers the action when clicked
onSubmitfunctionnullWhen the form saves and is validated, this function will be called with an object { password: string, newPassword: string }
showHeaderbooleanfalseToggles visibility the "Create new password" header
showCurrentPasswordFieldbooleanfalseToggles visibility of the current password field