30
30
import { useState } from 'react' ;
31
31
import { useDispatch , useSelector } from 'react-redux' ;
32
32
import { hideFastWithdrawalModal } from '../store/fastWithdrawalModalSlice' ;
33
+ import { X , Clipboard } from 'lucide-react' ;
33
34
import styles from './FastWithdrawalModal.module.css' ;
34
35
35
36
const FastWithdrawalModal = ( ) => {
@@ -131,8 +132,14 @@ const FastWithdrawalModal = () => {
131
132
132
133
if ( ! isVisible ) return null ;
133
134
135
+ const handleOverlayClick = e => {
136
+ if ( e . target === e . currentTarget ) {
137
+ handleClose ( ) ;
138
+ }
139
+ } ;
140
+
134
141
return (
135
- < div className = { styles . modalOverlay } >
142
+ < div className = { styles . modalOverlay } onClick = { handleOverlayClick } >
136
143
< div className = { styles . modalContent } >
137
144
< div className = { styles . modalHeader } >
138
145
< h2 > Fast Withdrawal</ h2 >
@@ -141,7 +148,7 @@ const FastWithdrawalModal = () => {
141
148
onClick = { handleClose }
142
149
className = { styles . closeButton }
143
150
>
144
- ×
151
+ < X size = { 20 } />
145
152
</ button >
146
153
</ div >
147
154
< div className = { styles . modalDescription } >
@@ -169,8 +176,9 @@ const FastWithdrawalModal = () => {
169
176
type = "button"
170
177
onClick = { ( ) => handlePaste ( setAmount ) }
171
178
className = { styles . pasteButton }
179
+ title = "Paste from clipboard"
172
180
>
173
- Paste
181
+ < Clipboard size = { 18 } />
174
182
</ button >
175
183
</ div >
176
184
</ div >
@@ -188,38 +196,41 @@ const FastWithdrawalModal = () => {
188
196
type = "button"
189
197
onClick = { ( ) => handlePaste ( setAddress ) }
190
198
className = { styles . pasteButton }
199
+ title = "Paste from clipboard"
191
200
>
192
- Paste
201
+ < Clipboard size = { 18 } />
193
202
</ button >
194
203
</ div >
195
204
</ div >
196
- < div className = { styles . horizontalInputs } >
197
- < div className = { styles . inputGroup } >
198
- < label className = { styles . inputLabel } >
199
- Select fast withdrawal server
200
- </ label >
201
- < select
202
- value = { selectedServer }
203
- onChange = { ( e ) => setSelectedServer ( e . target . value ) }
204
- className = { styles . input }
205
- >
206
- < option value = "localhost" > Localhost</ option >
207
- < option value = "192.168.1.100" > 192.168.1.100</ option >
208
- < option value = "192.168.1.101" > 192.168.1.101</ option >
209
- </ select >
210
- </ div >
211
- < div className = { styles . inputGroup } >
212
- < label className = { styles . inputLabel } >
213
- Select L2 to withdraw from
214
- </ label >
215
- < select
216
- value = { layer2Chain }
217
- onChange = { ( e ) => setLayer2Chain ( e . target . value ) }
218
- className = { styles . input }
219
- >
220
- < option value = "Thunder" > Thunder</ option >
221
- < option value = "BitNames" > BitNames</ option >
222
- </ select >
205
+ < div className = { styles . formGroup } >
206
+ < div className = { styles . horizontalInputs } >
207
+ < div className = { styles . inputGroup } >
208
+ < label className = { styles . inputLabel } >
209
+ Select fast withdrawal server
210
+ </ label >
211
+ < select
212
+ value = { selectedServer }
213
+ onChange = { ( e ) => setSelectedServer ( e . target . value ) }
214
+ className = { styles . input }
215
+ >
216
+ < option value = "localhost" > Localhost</ option >
217
+ < option value = "192.168.1.100" > 192.168.1.100</ option >
218
+ < option value = "192.168.1.101" > 192.168.1.101</ option >
219
+ </ select >
220
+ </ div >
221
+ < div className = { styles . inputGroup } >
222
+ < label className = { styles . inputLabel } >
223
+ Select L2 to withdraw from
224
+ </ label >
225
+ < select
226
+ value = { layer2Chain }
227
+ onChange = { ( e ) => setLayer2Chain ( e . target . value ) }
228
+ className = { styles . input }
229
+ >
230
+ < option value = "Thunder" > Thunder</ option >
231
+ < option value = "BitNames" > BitNames</ option >
232
+ </ select >
233
+ </ div >
223
234
</ div >
224
235
</ div >
225
236
< div className = { styles . buttonGroup } >
@@ -264,33 +275,39 @@ const FastWithdrawalModal = () => {
264
275
) }
265
276
{ ! isCompleted && (
266
277
< form onSubmit = { handleComplete } >
267
- < div className = { styles . inputGroup } >
268
- < div className = { styles . inputWithPaste } >
269
- < input
270
- type = "text"
271
- value = { paymentTxid }
272
- onChange = { ( e ) => setPaymentTxid ( e . target . value ) }
273
- placeholder = "Enter payment transaction ID"
274
- className = { styles . input }
275
- required
276
- />
278
+ < div className = { styles . formGroup } >
279
+ < div className = { styles . inputGroup } >
280
+ < label className = { styles . inputLabel } >
281
+ Payment Transaction ID
282
+ </ label >
283
+ < div className = { styles . inputWithPaste } >
284
+ < input
285
+ type = "text"
286
+ value = { paymentTxid }
287
+ onChange = { ( e ) => setPaymentTxid ( e . target . value ) }
288
+ placeholder = "Enter payment transaction ID"
289
+ className = { styles . input }
290
+ required
291
+ />
292
+ < button
293
+ type = "button"
294
+ onClick = { ( ) => handlePaste ( setPaymentTxid ) }
295
+ className = { styles . pasteButton }
296
+ title = "Paste from clipboard"
297
+ >
298
+ < Clipboard size = { 18 } />
299
+ </ button >
300
+ </ div >
301
+ </ div >
302
+ < div className = { styles . buttonGroup } >
277
303
< button
278
- type = "button"
279
- onClick = { ( ) => handlePaste ( setPaymentTxid ) }
280
- className = { styles . pasteButton }
304
+ type = "submit"
305
+ className = { styles . submitButton }
281
306
>
282
- Paste
307
+ Complete Withdrawal
283
308
</ button >
284
309
</ div >
285
310
</ div >
286
- < div className = { styles . buttonGroup } >
287
- < button
288
- type = "submit"
289
- className = { styles . submitButton }
290
- >
291
- Complete Withdrawal
292
- </ button >
293
- </ div >
294
311
</ form >
295
312
) }
296
313
{ successMessage && (
0 commit comments