-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRestorePasswordModal.tsx
48 lines (41 loc) · 1.09 KB
/
RestorePasswordModal.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import "./assets/modals.scss";
import React from "react";
import { I18nText } from "../i18n/I18nText";
import { Dialog } from "../ui/Dialog";
import { AuthModalTitle } from "./AuthModalTitle";
import {
RestorePasswordForm,
RestorePasswordFormValues,
} from "./RestorePasswordForm";
interface Props {
open: boolean;
onRequestClose: () => void;
phone: string;
submitError?: Error;
submitting: boolean;
onSubmit: (values: RestorePasswordFormValues) => void;
onResendClick: () => void;
}
export function RestorePasswordModal(props: Props) {
return (
<Dialog
open={props.open}
title={
<AuthModalTitle
title={<I18nText code="RegisterVerificationFormVerification" />}
/>
}
className="modal-authorization"
bodyClassName="modal-authorization-body"
onRequestClose={props.onRequestClose}
>
<RestorePasswordForm
phone={props.phone}
submitting={props.submitting}
submitError={props.submitError}
onSubmit={props.onSubmit}
onResendClick={props.onResendClick}
/>
</Dialog>
);
}