File tree Expand file tree Collapse file tree 7 files changed +142
-1
lines changed
__tests__/shared/components/Settings/__snapshots__ Expand file tree Collapse file tree 7 files changed +142
-1
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,10 @@ exports[`renders account setting page correctly 1`] = `
48
48
" link" : " preferences" ,
49
49
" title" : " Preferences" ,
50
50
},
51
+ Object {
52
+ " link" : " payment" ,
53
+ " title" : " Payment" ,
54
+ },
51
55
]
52
56
}
53
57
/>
@@ -805,6 +809,10 @@ exports[`renders preferences setting page correctly 1`] = `
805
809
" link" : " preferences" ,
806
810
" title" : " Preferences" ,
807
811
},
812
+ Object {
813
+ " link" : " payment" ,
814
+ " title" : " Payment" ,
815
+ },
808
816
]
809
817
}
810
818
/>
@@ -1559,6 +1567,10 @@ exports[`renders profile setting page correctly 1`] = `
1559
1567
" link" : " preferences" ,
1560
1568
" title" : " Preferences" ,
1561
1569
},
1570
+ Object {
1571
+ " link" : " payment" ,
1572
+ " title" : " Payment" ,
1573
+ },
1562
1574
]
1563
1575
}
1564
1576
/>
@@ -2319,6 +2331,10 @@ exports[`renders tools setting page correctly 1`] = `
2319
2331
" link" : " preferences" ,
2320
2332
" title" : " Preferences" ,
2321
2333
},
2334
+ Object {
2335
+ " link" : " payment" ,
2336
+ " title" : " Payment" ,
2337
+ },
2322
2338
]
2323
2339
}
2324
2340
/>
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ export const TABS = {
11
11
TOOLS : 'tools' ,
12
12
ACCOUNT : 'account' ,
13
13
PREFERENCES : 'preferences' ,
14
+ PAYMENT : 'payment' ,
14
15
} ;
15
16
16
17
export default createActions ( {
Original file line number Diff line number Diff line change
1
+ /* eslint-disable prefer-destructuring */
2
+ import React from 'react' ;
3
+
4
+ import ErrorWrapper from '../ErrorWrapper' ;
5
+
6
+ import './styles.scss' ;
7
+
8
+ export default class Payment extends React . Component {
9
+ constructor ( props ) {
10
+ super ( props ) ;
11
+ this . state = { } ;
12
+ }
13
+
14
+ render ( ) {
15
+ return (
16
+ < ErrorWrapper >
17
+ < div styleName = "payment-container" >
18
+ < div styleName = "header" >
19
+ < h3 > Payment Settings</ h3 >
20
+ </ div >
21
+ < div styleName = "platform-banner" />
22
+ </ div >
23
+ < div styleName = "footer" />
24
+ </ ErrorWrapper >
25
+ ) ;
26
+ }
27
+ }
28
+
29
+ Payment . defaultProps = {
30
+ } ;
31
+
32
+ Payment . propTypes = {
33
+ } ;
Original file line number Diff line number Diff line change
1
+ @import ' ~styles/mixins' ;
2
+
3
+ .payment-container {
4
+ background-color : $listing-filter-bg ;
5
+ padding : $pad-xxxxl ;
6
+ border-radius : 8px ;
7
+ margin : 32px 0 32px ;
8
+
9
+ @include xs-to-sm {
10
+ padding : $pad-xxl $pad-lg ;
11
+ margin : 24px 0 24px ;
12
+ }
13
+
14
+ .header {
15
+ margin : 0 0 40px ;
16
+
17
+ @include xs-to-sm {
18
+ margin : 0 0 $pad-xxl ;
19
+ }
20
+
21
+ h3 {
22
+ @include barlow-bold ;
23
+
24
+ font-size : 20px ;
25
+ font-weight : 600 ;
26
+ line-height : 22px ;
27
+ color : $tco-black ;
28
+ text-transform : uppercase ;
29
+
30
+ @include xs-to-md {
31
+ @include barlow-condensed-semi-bold ;
32
+
33
+ font-weight : 500 ;
34
+ font-size : 22px ;
35
+ line-height : 24px ;
36
+ }
37
+ }
38
+ }
39
+
40
+ .platform-banner {
41
+ background-color : $tc-white ;
42
+ border-radius : 4px ;
43
+ width : 100% ;
44
+ padding : 32px ;
45
+
46
+ @include xs-to-sm {
47
+ padding : 24px 16px ;
48
+ }
49
+ }
50
+ }
51
+
52
+ .footer {
53
+ display : flex ;
54
+ flex-direction : row-reverse ;
55
+
56
+ .save-changes-btn {
57
+ @include roboto-bold ;
58
+
59
+ font-weight : 700 ;
60
+ font-size : 16px ;
61
+ line-height : 24px ;
62
+ border-radius : 50px !important ;
63
+ background : #137d60 !important ;
64
+ color : #fff !important ;
65
+ text-transform : uppercase ;
66
+ padding : 11px 23px ;
67
+ margin : 0 ;
68
+
69
+ & .disabled {
70
+ opacity : 0.5 ;
71
+ }
72
+ }
73
+
74
+ @include xs-to-md {
75
+ padding : $pad-xxxxl 0 $pad-sm ;
76
+ border-top : 2px solid $color-black-10 ;
77
+
78
+ .save-changes-btn {
79
+ font-size : 14px ;
80
+ line-height : 20px ;
81
+ }
82
+ }
83
+ }
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ export const SETTINGS_TABS = [
12
12
{ title : 'Tools' , link : TABS . TOOLS } ,
13
13
{ title : 'Account' , link : TABS . ACCOUNT } ,
14
14
{ title : 'Preferences' , link : TABS . PREFERENCES } ,
15
+ { title : 'Payment' , link : TABS . PAYMENT } ,
15
16
] ;
16
17
17
18
export const PROFILE_SETTINGS = {
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import Tools from './Tools';
16
16
import './style.scss' ;
17
17
import Account from './Account' ;
18
18
import Preferences from './Preferences' ;
19
+ import Payment from './Payment' ;
19
20
import TabSelector from './TabSelector' ;
20
21
import { SETTINGS_TABS } from './constants' ;
21
22
@@ -140,6 +141,12 @@ export default function Settings(props) {
140
141
/>
141
142
)
142
143
}
144
+ {
145
+ newProps . settingsTab === TABS . PAYMENT
146
+ && (
147
+ < Payment />
148
+ )
149
+ }
143
150
</ div >
144
151
</ div >
145
152
) ;
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import Error404 from 'components/Error404';
16
16
export default function Router ( { base } ) {
17
17
return (
18
18
< Switch >
19
- < Route component = { Settings } exact path = { `${ base } /:settingsTab(profile|skills|tracks|tools|account|preferences)` } />
19
+ < Route component = { Settings } exact path = { `${ base } /:settingsTab(profile|skills|tracks|tools|account|preferences|payment )` } />
20
20
< Route component = { EmailVerification } exact path = { `${ base } /account/changeEmail` } />
21
21
< Route component = { Success } exact path = { `${ base } /account/email-verification/success` } />
22
22
< Route component = { Failed } exact path = { `${ base } /account/email-verification/failure` } />
You can’t perform that action at this time.
0 commit comments