File tree Expand file tree Collapse file tree 4 files changed +12
-0
lines changed
pages/settings/Payments/PaymentsPage Expand file tree Collapse file tree 4 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,9 @@ const propTypes = {
87
87
// eslint-disable-next-line react/forbid-prop-types
88
88
textStyles : PropTypes . arrayOf ( PropTypes . object ) ,
89
89
90
+ /** Whether we should use the default hover style */
91
+ shouldUseDefaultHover : PropTypes . bool ,
92
+
90
93
/** Whether we should use the success theme color */
91
94
success : PropTypes . bool ,
92
95
@@ -142,6 +145,7 @@ const defaultProps = {
142
145
style : [ ] ,
143
146
innerStyles : [ ] ,
144
147
textStyles : [ ] ,
148
+ shouldUseDefaultHover : false ,
145
149
success : false ,
146
150
danger : false ,
147
151
children : null ,
@@ -295,6 +299,7 @@ class Button extends Component {
295
299
...this . props . innerStyles ,
296
300
] }
297
301
hoverStyle = { [
302
+ this . props . shouldUseDefaultHover && ! this . props . isDisabled ? styles . buttonDefaultHovered : undefined ,
298
303
this . props . success && ! this . props . isDisabled ? styles . buttonSuccessHovered : undefined ,
299
304
this . props . danger && ! this . props . isDisabled ? styles . buttonDangerHovered : undefined ,
300
305
] }
Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ function ConfirmContent(props) {
76
76
style = { [ styles . mt3 , styles . noSelect ] }
77
77
onPress = { props . onCancel }
78
78
text = { props . cancelText || props . translate ( 'common.no' ) }
79
+ shouldUseDefaultHover
79
80
/>
80
81
) }
81
82
</ View >
Original file line number Diff line number Diff line change @@ -455,6 +455,7 @@ class BasePaymentsPage extends React.Component {
455
455
onPress = { this . navigateToAddPaypalRoute }
456
456
style = { [ styles . mb4 ] }
457
457
text = { this . props . translate ( 'common.edit' ) }
458
+ shouldUseDefaultHover
458
459
/>
459
460
) }
460
461
< Button
Original file line number Diff line number Diff line change @@ -525,6 +525,11 @@ const styles = {
525
525
textAlign : 'center' ,
526
526
} ,
527
527
528
+ buttonDefaultHovered : {
529
+ backgroundColor : themeColors . buttonHoveredBG ,
530
+ borderWidth : 0 ,
531
+ } ,
532
+
528
533
buttonSuccess : {
529
534
backgroundColor : themeColors . success ,
530
535
borderWidth : 0 ,
You can’t perform that action at this time.
0 commit comments