1
1
import cr from 'classnames' ;
2
- import * as React from 'react' ;
2
+ import React , { FormEvent } from 'react' ;
3
3
import { Button } from 'react-bootstrap' ;
4
4
import { useSelector } from 'react-redux' ;
5
5
import { CustomInput } from '../' ;
@@ -79,7 +79,7 @@ const EmailForm = React.memo((props: EmailFormProps) => {
79
79
return false ;
80
80
} ;
81
81
82
- const handleClick = ( label ?: string , e ?: React . FormEvent < HTMLInputElement > ) => {
82
+ const handleClick = ( e : FormEvent < HTMLInputElement > ) => {
83
83
if ( e ) {
84
84
e . preventDefault ( ) ;
85
85
}
@@ -101,21 +101,20 @@ const EmailForm = React.memo((props: EmailFormProps) => {
101
101
return (
102
102
< form >
103
103
< div className = { emailFormClass } >
104
- { ! isMobileDevice && < div className = "cr-email-form__options-group" >
105
- < div className = "cr-email-form__option" >
106
- < div className = "cr-email-form__option-inner" >
107
- { title || 'Forgot password' }
108
- < div className = "cr-email-form__cros-icon" onClick = { handleCancel } >
109
- < CloseIcon className = "close-icon" />
110
- </ div >
104
+ { ! isMobileDevice && (
105
+ < div className = "cr-email-form__options-group" >
106
+ < div className = "cr-email-form__option" >
107
+ < div className = "cr-email-form__option-inner" >
108
+ { title || 'Forgot password' }
109
+ < div className = "cr-email-form__cros-icon" onClick = { handleCancel } >
110
+ < CloseIcon className = "close-icon" />
111
+ </ div >
112
+ </ div >
113
+ </ div >
111
114
</ div >
112
- </ div >
113
- </ div >
114
- }
115
+ ) }
115
116
< div className = "cr-email-form__form-content" >
116
- < div className = "cr-email-form__header" >
117
- { message }
118
- </ div >
117
+ < div className = "cr-email-form__header" > { message } </ div >
119
118
< div className = { emailGroupClass } >
120
119
< CustomInput
121
120
type = "email"
@@ -137,10 +136,9 @@ const EmailForm = React.memo((props: EmailFormProps) => {
137
136
block = { true }
138
137
type = "button"
139
138
disabled = { isButtonDisabled ( ) }
140
- onClick = { e => handleClick ( undefined , e ) }
139
+ onClick = { ( e ) => handleClick ( e as any ) }
141
140
size = "lg"
142
- variant = "primary"
143
- >
141
+ variant = "primary" >
144
142
{ isLoading ? 'Loading...' : buttonLabel ? buttonLabel : 'Send' }
145
143
</ Button >
146
144
</ div >
@@ -150,6 +148,4 @@ const EmailForm = React.memo((props: EmailFormProps) => {
150
148
) ;
151
149
} ) ;
152
150
153
- export {
154
- EmailForm ,
155
- } ;
151
+ export { EmailForm } ;
0 commit comments