@@ -29,12 +29,6 @@ import CollateralRatioSlider from './CollateralRatioSlider'
29
29
import { SimpleInput } from './Input'
30
30
import squeethLogo from 'public/images/squeeth-logo.svg'
31
31
32
- const useTextStyles = makeStyles ( {
33
- light : {
34
- color : 'rgba(255, 255, 255, 0.8)' ,
35
- } ,
36
- } )
37
-
38
32
const useToggleButtonStyles = makeStyles ( ( theme ) => ( {
39
33
root : {
40
34
textTransform : 'none' ,
@@ -61,50 +55,29 @@ const useModalStyles = makeStyles((theme) =>
61
55
overflow : 'scroll' ,
62
56
display : 'block' ,
63
57
} ,
64
- titleSection : {
65
- display : 'flex' ,
66
- justifyContent : 'space-between' ,
67
- alignItems : 'center' ,
68
- } ,
69
- modalTitle : {
58
+ title : {
70
59
fontSize : '24px' ,
71
60
fontWeight : 700 ,
72
61
letterSpacing : '-0.01em' ,
73
62
} ,
63
+ sectionTitle : {
64
+ fontSize : '18px' ,
65
+ fontWeight : 700 ,
66
+ } ,
74
67
priceContainer : {
75
68
backgroundColor : theme . palette . background . lightStone ,
76
69
padding : theme . spacing ( 0.75 , 1.5 ) ,
77
70
borderRadius : '8px' ,
78
71
} ,
79
-
80
- subSection : { } ,
81
- priceRangeSectionHeader : {
82
- display : 'flex' ,
83
- justifyContent : 'space-between' ,
84
- alignItems : 'center' ,
85
- } ,
86
- priceRangeSectionHeaderLeftColumn : {
87
- display : 'flex' ,
88
- alignItems : 'center' ,
89
- gap : theme . spacing ( 1 ) ,
90
- } ,
91
- sectionTitle : {
92
- fontSize : '18px' ,
93
- fontWeight : 700 ,
94
- } ,
95
72
divider : {
96
73
height : '2px' ,
97
74
backgroundColor : theme . palette . background . lightStone ,
98
75
margin : theme . spacing ( 4 , 0 ) ,
99
76
display : 'inline-block' ,
100
77
width : '100%' ,
101
78
} ,
102
- priceRangeSection : {
103
- marginTop : theme . spacing ( 3 ) ,
104
- display : 'flex' ,
105
- justifyContent : 'space-between' ,
106
- alignItems : 'center' ,
107
- gap : theme . spacing ( 2 ) ,
79
+ lightFontColor : {
80
+ color : 'rgba(255, 255, 255, 0.8)' ,
108
81
} ,
109
82
} ) ,
110
83
)
@@ -145,7 +118,6 @@ const LpSettings: React.FC<{
145
118
146
119
const classes = useModalStyles ( )
147
120
const toggleButtonClasses = useToggleButtonStyles ( )
148
- const textClasses = useTextStyles ( )
149
121
150
122
const squeethPrice = getWSqueethPositionValue ( 1 )
151
123
const collatRatioVal = new BigNumber ( collatRatio ) . div ( 100 ) . toNumber ( )
@@ -220,17 +192,17 @@ const LpSettings: React.FC<{
220
192
221
193
return (
222
194
< >
223
- < div className = { classes . titleSection } >
224
- < Typography id = "modal-title" variant = "h2" className = { classes . modalTitle } >
195
+ < Box display = "flex" justifyContent = "space-between" alignItems = "center" >
196
+ < Typography id = "modal-title" variant = "h2" className = { classes . title } >
225
197
Mint and LP Preview
226
198
</ Typography >
227
199
228
200
< div className = { classes . priceContainer } >
229
201
< TokenPrice symbol = "ETH" price = { formatNumber ( Number ( ethPrice ) ) } />
230
202
</ div >
231
- </ div >
203
+ </ Box >
232
204
233
- < Box className = { classes . subSection } marginTop = "32px" >
205
+ < Box marginTop = "32px" >
234
206
< Typography variant = "h4" className = { classes . sectionTitle } >
235
207
Mint amounts
236
208
</ Typography >
@@ -246,9 +218,9 @@ const LpSettings: React.FC<{
246
218
247
219
< Divider className = { classes . divider } />
248
220
249
- < div className = { classes . subSection } >
250
- < div className = { classes . priceRangeSectionHeader } >
251
- < div className = { classes . priceRangeSectionHeaderLeftColumn } >
221
+ < div >
222
+ < Box display = "flex" justifyContent = "space-between" alignItems = "center" >
223
+ < Box display = "flex" alignItems = "center" gridGap = "8px" >
252
224
< TokenLogo logoSrc = { squeethLogo } />
253
225
254
226
< div >
@@ -257,17 +229,17 @@ const LpSettings: React.FC<{
257
229
</ Typography >
258
230
< TokenPrice symbol = "oSQTH" price = { formatNumber ( squeethPrice . toNumber ( ) ) } isSmall />
259
231
</ div >
260
- </ div >
232
+ </ Box >
261
233
262
234
< Checkbox
263
235
isChecked = { usingDefaultPriceRange }
264
236
onChange = { setUsingDefaultPriceRange }
265
237
name = "priceRangeDefault"
266
238
label = "Default"
267
239
/>
268
- </ div >
240
+ </ Box >
269
241
270
- < div className = { classes . priceRangeSection } >
242
+ < Box marginTop = "24px" display = "flex" justifyContent = "space-between" alignItems = "center" gridGap = "20px" >
271
243
< SimpleInput
272
244
id = "min-price"
273
245
label = "Min price"
@@ -301,12 +273,12 @@ const LpSettings: React.FC<{
301
273
) ,
302
274
} }
303
275
/>
304
- </ div >
276
+ </ Box >
305
277
</ div >
306
278
307
279
< Divider className = { classes . divider } />
308
280
309
- < div className = { classes . subSection } >
281
+ < div >
310
282
< Box sx = { { display : 'flex' , justifyContent : 'space-between' , alignItems : 'center' } } >
311
283
< Typography style = { { fontWeight : 500 } } > Use Uniswap LP NFT as collateral</ Typography >
312
284
@@ -328,7 +300,7 @@ const LpSettings: React.FC<{
328
300
329
301
< Divider className = { classes . divider } />
330
302
331
- < div className = { classes . subSection } >
303
+ < div >
332
304
< Box sx = { { display : 'flex' , justifyContent : 'space-between' , alignItems : 'center' } } >
333
305
< Typography variant = "h4" className = { classes . sectionTitle } >
334
306
Collateralization ratio
@@ -365,54 +337,54 @@ const LpSettings: React.FC<{
365
337
366
338
< InfoBox marginTop = "24px" >
367
339
< Box display = "flex" justifyContent = "space-between" gridGap = "12px" >
368
- < Typography className = { textClasses . light } > Liquidation price</ Typography >
340
+ < Typography className = { classes . lightFontColor } > Liquidation price</ Typography >
369
341
< Box display = "flex" gridGap = "8px" >
370
342
< Typography > $3,018.29</ Typography >
371
- < Typography className = { textClasses . light } > per ETH</ Typography >
343
+ < Typography className = { classes . lightFontColor } > per ETH</ Typography >
372
344
</ Box >
373
345
</ Box >
374
346
</ InfoBox >
375
347
376
348
< InfoBox marginTop = "6px" >
377
349
< Box display = "flex" justifyContent = "space-between" gridGap = "12px" >
378
- < Typography className = { textClasses . light } > Projected APY</ Typography >
350
+ < Typography className = { classes . lightFontColor } > Projected APY</ Typography >
379
351
< Typography > 26.08 %</ Typography >
380
352
</ Box >
381
353
</ InfoBox >
382
354
383
355
< Divider className = { classes . divider } />
384
356
385
- < div className = { classes . subSection } >
357
+ < div >
386
358
< InfoBox >
387
359
< Box display = "flex" justifyContent = "center" gridGap = "6px" >
388
360
< Typography > Total Deposit</ Typography >
389
- < Typography className = { textClasses . light } > =</ Typography >
361
+ < Typography className = { classes . lightFontColor } > =</ Typography >
390
362
391
- < Typography className = { textClasses . light } >
363
+ < Typography className = { classes . lightFontColor } >
392
364
{ loadingDepositAmounts ? 'loading' : formatTokenAmount ( depositInTotal ) }
393
365
</ Typography >
394
- < Typography className = { textClasses . light } > ETH</ Typography >
366
+ < Typography className = { classes . lightFontColor } > ETH</ Typography >
395
367
</ Box >
396
368
</ InfoBox >
397
369
398
370
< Box display = "flex" justifyContent = "space-between" gridGap = "10px" marginTop = "6px" >
399
371
< InfoBox >
400
372
< Box display = "flex" justifyContent = "space-between" gridGap = "12px" >
401
- < Typography className = { textClasses . light } > { 'To be LP’ed' } </ Typography >
373
+ < Typography className = { classes . lightFontColor } > { 'To be LP’ed' } </ Typography >
402
374
403
375
< Box display = "flex" gridGap = "8px" >
404
376
< Typography > { loadingDepositAmounts ? 'loading' : formatTokenAmount ( depositInLp ) } </ Typography >
405
- < Typography className = { textClasses . light } > ETH</ Typography >
377
+ < Typography className = { classes . lightFontColor } > ETH</ Typography >
406
378
</ Box >
407
379
</ Box >
408
380
</ InfoBox >
409
381
< InfoBox >
410
382
< Box display = "flex" justifyContent = "space-between" gridGap = "12px" >
411
- < Typography className = { textClasses . light } > { 'Vault' } </ Typography >
383
+ < Typography className = { classes . lightFontColor } > { 'Vault' } </ Typography >
412
384
413
385
< Box display = "flex" gridGap = "8px" >
414
386
< Typography > { loadingDepositAmounts ? 'loading' : formatTokenAmount ( depositInVault ) } </ Typography >
415
- < Typography className = { textClasses . light } > ETH</ Typography >
387
+ < Typography className = { classes . lightFontColor } > ETH</ Typography >
416
388
</ Box >
417
389
</ Box >
418
390
</ InfoBox >
0 commit comments