ConfirmAccount.tsx 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import OtpInput from 'react18-input-otp';
  2. import { AppflowyLogo } from '../../_shared/svg/AppflowyLogo';
  3. import { useConfirmAccount } from './ConfirmAccount.hooks';
  4. import { Button } from '../../_shared/Button';
  5. export const ConfirmAccount = () => {
  6. const { handleChange, otpValues, onConfirmClick } = useConfirmAccount();
  7. return (
  8. <div className='flex h-screen w-full flex-col items-center justify-center gap-12 text-center'>
  9. <div className='flex h-10 w-10 justify-center'>
  10. <AppflowyLogo />
  11. </div>
  12. <div className='flex flex-col gap-2'>
  13. <span className='text-2xl font-semibold '>Enter the code sent to your phone</span>
  14. <div>
  15. <span className='block text-gray-500'>Confirm that this phone belongs to you.</span>
  16. <span className='block text-gray-500'>
  17. Code sent to <span className='text-text-title'>+86 10 6764 5489</span>
  18. </span>
  19. </div>
  20. </div>
  21. <div className='flex h-24 flex-col gap-4 '>
  22. <div className={'flex-1'}>
  23. <OtpInput
  24. value={otpValues}
  25. onChange={handleChange}
  26. numInputs={5}
  27. isInputNum={true}
  28. separator={<span> </span>}
  29. inputStyle='border border-gray-300 rounded-lg h-full !w-14 font-semibold focus:ring-2 focus:ring-fill-hover focus:ring-opacity-50'
  30. containerStyle='h-full w-full flex justify-around gap-2 '
  31. />
  32. </div>
  33. <a href='#' className='hover:text-content-hover text-xs text-fill-hover'>
  34. <span>Send code again</span>
  35. </a>
  36. </div>
  37. <Button size={'primary'} onClick={() => onConfirmClick()}>
  38. Get Started
  39. </Button>
  40. </div>
  41. );
  42. };