@@ -8,7 +8,6 @@ const {StyleSheet} = require('aphrodite/no-important')
8
8
9
9
// Components
10
10
const ReduxComponent = require ( '../reduxComponent' )
11
- const NavigationBarButtonContainer = require ( './buttons/navigationBarButtonContainer' )
12
11
const { NormalizedButton} = require ( '../common/browserButton' )
13
12
14
13
// Actions
@@ -67,57 +66,43 @@ class PublisherToggle extends React.Component {
67
66
}
68
67
69
68
render ( ) {
70
- return < NavigationBarButtonContainer isSquare isNested
71
- containerFor = { styles . publisherButtonContainer } >
72
- < NormalizedButton custom = { [
73
- ( ! this . props . isEnabledForPaymentsPublisher && this . props . isVerifiedPublisher ) && styles . publisherButtonContainer__button_noFundVerified ,
74
- ( this . props . isEnabledForPaymentsPublisher && this . props . isVerifiedPublisher ) && styles . publisherButtonContainer__button_fundVerified ,
75
- ( ! this . props . isEnabledForPaymentsPublisher && ! this . props . isVerifiedPublisher ) && styles . publisherButtonContainer__button_noFundUnverified ,
76
- ( this . props . isEnabledForPaymentsPublisher && ! this . props . isVerifiedPublisher ) && styles . publisherButtonContainer__button_fundUnverified ,
77
- styles . publisherButtonContainer__button
78
- ] }
79
- l10nId = { this . l10nString }
80
- testId = 'publisherButton'
81
- testAuthorized = { this . props . isEnabledForPaymentsPublisher }
82
- testVerified = { this . props . isVerifiedPublisher }
83
- onClick = { this . onAuthorizePublisher }
84
- />
85
- </ NavigationBarButtonContainer >
69
+ return < NormalizedButton custom = { [
70
+ ( ! this . props . isEnabledForPaymentsPublisher && this . props . isVerifiedPublisher ) && styles . publisherToggle_noFundVerified ,
71
+ ( this . props . isEnabledForPaymentsPublisher && this . props . isVerifiedPublisher ) && styles . publisherToggle_fundVerified ,
72
+ ( ! this . props . isEnabledForPaymentsPublisher && ! this . props . isVerifiedPublisher ) && styles . publisherToggle_noFundUnverified ,
73
+ ( this . props . isEnabledForPaymentsPublisher && ! this . props . isVerifiedPublisher ) && styles . publisherToggle_fundUnverified ,
74
+ styles . publisherToggle
75
+ ] }
76
+ l10nId = { this . l10nString }
77
+ testId = 'publisherToggle'
78
+ testAuthorized = { this . props . isEnabledForPaymentsPublisher }
79
+ testVerified = { this . props . isVerifiedPublisher }
80
+ onClick = { this . onAuthorizePublisher }
81
+ />
86
82
}
87
83
}
88
84
89
85
const styles = StyleSheet . create ( {
90
- // cf: navigationBar__buttonContainer_bookmarkButtonContainer on navigationBar.js
91
- publisherButtonContainer : {
92
- borderLeft : 'none' ,
93
- borderTopLeftRadius : 0 ,
94
- borderBottomLeftRadius : 0 ,
95
-
96
- // TODO (Suguru): Refactor navigationBar.less to remove !important.
97
- // See the wildcard style under '#navigationBar'.
98
- animation : 'none !important'
99
- } ,
100
-
101
- publisherButtonContainer__button : {
86
+ publisherToggle : {
102
87
backgroundSize : '18px 18px' ,
103
88
width : '100%' ,
104
89
height : '100%'
105
90
} ,
106
91
107
- publisherButtonContainer__button_noFundVerified : {
92
+ publisherToggle_noFundVerified : {
108
93
// 1px added due to the check mark
109
94
background : `url(${ noFundVerifiedPublisherImage } ) calc(50% + 1px) no-repeat`
110
95
} ,
111
96
112
- publisherButtonContainer__button_fundVerified : {
97
+ publisherToggle_fundVerified : {
113
98
background : `url(${ fundVerifiedPublisherImage } ) calc(50% + 1px) no-repeat`
114
99
} ,
115
100
116
- publisherButtonContainer__button_noFundUnverified : {
101
+ publisherToggle_noFundUnverified : {
117
102
background : `url(${ noFundUnverifiedPublisherImage } ) 50% no-repeat`
118
103
} ,
119
104
120
- publisherButtonContainer__button_fundUnverified : {
105
+ publisherToggle_fundUnverified : {
121
106
background : `url(${ fundUnverifiedPublisherImage } ) 50% no-repeat`
122
107
}
123
108
} )
0 commit comments