@@ -76,6 +76,17 @@ const useStyles = makeStyles(
76
76
flex : 'auto' ,
77
77
} ,
78
78
} ,
79
+ flexColumnContainer : {
80
+ display : 'flex' ,
81
+ flexDirection : 'column' ,
82
+ flex : '1.75 1 0' ,
83
+ gap : 20 ,
84
+
85
+ [ theme . breakpoints . down ( 'sm' ) ] : {
86
+ width : '100%' ,
87
+ flex : 'auto' ,
88
+ } ,
89
+ } ,
79
90
cardContainerTitle : {
80
91
fontSize : 14 ,
81
92
fontWeight : 'bold' ,
@@ -104,6 +115,11 @@ const useStyles = makeStyles(
104
115
fontSize : 13 ,
105
116
flex : '1 1 0' ,
106
117
} ,
118
+ button : {
119
+ '&:hover' : {
120
+ color : '#0F879D' ,
121
+ } ,
122
+ } ,
107
123
columnContainer : {
108
124
display : 'flex' ,
109
125
alignItems : 'center' ,
@@ -342,7 +358,7 @@ function StripeForm(props: {
342
358
< div >
343
359
{ stripeStyles }
344
360
< div className = { classes . paperContainer } >
345
- < Box className = { classes . subscriptionContainer } >
361
+ < Box className = { classes . flexColumnContainer } >
346
362
< p className = { classes ?. cardContainerTitle } > Subscriptions</ p >
347
363
{ state . billingInfo . length > 0 ? (
348
364
state . billingInfo . map (
@@ -406,13 +422,14 @@ function StripeForm(props: {
406
422
) }
407
423
</ Box >
408
424
< Box className = { classes . subscriptionContainer } >
409
- < p className = { classes ?. cardContainerTitle } > Payment methods </ p >
425
+ < p className = { classes ?. cardContainerTitle } > Payments </ p >
410
426
< Paper className = { classes ?. cardContainer } >
411
427
< Box
412
428
sx = { {
413
429
display : 'flex' ,
414
- justifyContent : 'flex-end ' ,
430
+ justifyContent : 'flex-start ' ,
415
431
alignItems : 'center' ,
432
+ gap : '1rem' ,
416
433
} }
417
434
>
418
435
< Button
@@ -426,9 +443,23 @@ function StripeForm(props: {
426
443
< Spinner size = "sm" className = { classes . spinner } />
427
444
) }
428
445
</ Button >
446
+ { state . cards . length > 0 && (
447
+ < Button
448
+ variant = "outlined"
449
+ color = "secondary"
450
+ className = { classes . button }
451
+ disabled = { props . disabled || state . isLoading }
452
+ onClick = { handleSubmit }
453
+ >
454
+ Invoices
455
+ { state . isLoading && (
456
+ < Spinner size = "sm" className = { classes . spinner } />
457
+ ) }
458
+ </ Button >
459
+ ) }
429
460
</ Box >
430
461
{ state . cards . length === 0 && ! state . isFetching ? (
431
- < p className = { classes . emptyMethod } > No payment method available</ p >
462
+ < p className = { classes . emptyMethod } > No payment methods available</ p >
432
463
) : (
433
464
< >
434
465
{ state . cards . map (
0 commit comments