Ionic + React onboarding UI
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

enterNewPassword.tsx 2.4 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import { IonContent, IonButton, IonToast } from '@ionic/react';
  2. import { lockOpenOutline } from 'ionicons/icons';
  3. import React, { useState } from 'react';
  4. import InputWidget from '../../components/input/InputWidget';
  5. import styles from './EnterOTP.module.scss';
  6. import loginStyles from '../../commonStyles/loginFlow/LoginStyles.module.scss';
  7. type Props = { };
  8. const EnterOTPView: React.FC<Props> = () => {
  9. const [successState, setSuccessState] = useState(false);
  10. return(
  11. <IonContent>
  12. <section className={loginStyles.upfold}>
  13. <div className={loginStyles.container}>
  14. <figure>
  15. <img src='assets/images/welcome/upfold.svg' alt='upfold image'/>
  16. </figure>
  17. <h2> Enter New Password </h2>
  18. <p>Your password must be at least 6 characters.</p>
  19. </div>
  20. </section>
  21. <section className={styles.inputForm}>
  22. <div className={styles.input}>
  23. <InputWidget type={'PASSWORD'} icon={lockOpenOutline} placeholder={'Enter your new password'} />
  24. </div>
  25. <div className={styles.input}>
  26. <InputWidget type={'PASSWORD'} icon={lockOpenOutline} placeholder={'Confirm new password'} />
  27. </div>
  28. <div className={styles.info}>
  29. <p>(i) Do not enter any of the old passwords, system will reject the repeated passwords.</p>
  30. </div>
  31. <div className={styles.actionButtonsHolder}>
  32. <IonButton className={`${styles.actionButton}`} expand='block' onClick={()=>setSuccessState(true)}> Change </IonButton>
  33. <IonToast
  34. isOpen={successState}
  35. onDidDismiss={() => setSuccessState(false)}
  36. header= 'Success!'
  37. message="You have successfully changed your password. Please use your newly set password"
  38. // duration={2000}
  39. cssClass={loginStyles.successToast}
  40. />
  41. </div>
  42. </section>
  43. </IonContent>
  44. )
  45. }
  46. export default EnterOTPView;