+
+
}
@@ -301,7 +301,10 @@ class PaymentsTab extends ImmutableComponent {
const gridStyles = StyleSheet.create({
row1col1: {
gridRow: 1,
- gridColumn: 1
+ gridColumn: 1,
+
+ // Ensure the spacing between switch__label on a small viewport
+ paddingRight: globalStyles.spacing.panelPadding
},
row1col2: {
@@ -316,89 +319,90 @@ const gridStyles = StyleSheet.create({
})
const styles = StyleSheet.create({
- flexAlignCenter: {
- display: 'flex',
- alignItems: 'center'
+ payments: {
+ width: '805px',
+
+ // cf: padding of .prefTabContainer
+ paddingBottom: '40px'
},
- paymentsContainer: {
- position: 'relative',
- overflowX: 'hidden',
- width: '805px',
- paddingBottom: '40px' // cf: padding of .prefTabContainer
+ payments__history__header: {
+ paddingLeft: `${paymentStylesVariables.spacing.paymentHistoryTablePadding} !important`
},
- titleWrapper: {
- display: 'grid',
- gridTemplateColumns: '1fr 1fr 1fr',
- alignItems: 'center',
- width: '100%',
- padding: `0 ${globalStyles.spacing.panelPadding}`
+ payments__history__body: {
+ height: '300px',
+ overflowY: 'auto',
+ padding: '0 !important'
},
- titleWrapper__title: {
- position: 'relative',
- right: globalStyles.spacing.panelPadding
+ payments__history__footer: {
+ display: 'block !important',
+ paddingLeft: `${paymentStylesVariables.spacing.paymentHistoryTablePadding} !important`,
+ paddingTop: '10px !important',
+ paddingBottom: '10px !important'
},
- titleWrapper__logo: {
- width: '40px'
+ payments__history__title: {
+ // TODO: refactor preferences.less to remove !important
+ color: `${globalStyles.color.braveMediumOrange} !important`,
+ textIndent: '0 !important'
},
- titleWrapper__switchWrap: {
- display: 'flex',
+ payments__title: {
+ display: 'grid',
+ gridTemplateColumns: '1fr 1fr 1fr',
alignItems: 'center',
width: '100%'
},
- switchWrap__label: {
- color: '#999',
- fontWeight: 'bold'
+ payments__title__icon_bat: {
+ width: globalStyles.spacing.batIconWidth
},
- switchWrap__label_left: {
- paddingRight: '.75ch !important'
+ payments__title__switch: {
+ display: 'flex',
+ alignItems: 'center'
},
- switchWrap__label_right: {
- // TODO: Add 'position: relative' and 'bottom: 1px' for macOS (en_US) only.
- paddingLeft: '.75ch !important',
- color: globalStyles.color.braveOrange
+ payments__title__switch__moreInfo: {
+ color: globalStyles.color.commonTextColor,
+ position: 'relative',
+ left: '3px',
+ cursor: 'pointer',
+ fontSize: globalStyles.payments.fontSize.regular,
+
+ // TODO: refactor preferences.less to remove !important
+ ':hover': {
+ textDecoration: 'none !important'
+ }
},
- switchWrap__right: {
+ payments__title__actions: {
display: 'flex',
alignItems: 'center',
- justifyContent: 'space-between',
- width: `calc(100% + ${globalStyles.spacing.panelPadding})`
+ justifyContent: 'space-between'
},
- // Auto suggest switch
- switchWrap__autoSuggestSwitch: {
+ payments__title__actions__autoSuggest: {
+ fontSize: globalStyles.fontSize.settingItemSubtext,
+ display: 'flex',
+ alignItems: 'center',
+
// TODO: Refactor switchControls.less
position: 'relative',
- right: '5px',
top: '1px'
},
- autoSuggestSwitch__subtext: {
- fontSize: globalStyles.fontSize.settingItemSubtext
- },
- autoSuggestSwitch__moreInfo: {
- color: globalStyles.color.commonTextColor
- },
- autoSuggestSwitch__moreInfoBtnSuggest: {
- // TODO: refactor preferences.less to remove !important
- ':hover': {
- textDecoration: 'none !important'
- }
- },
- // History and settings icons
- switchWrap__mainIconsRight: {
+ payments__title__actions__icons: {
position: 'relative',
- top: '3.5px'
+ top: '3.5px',
+
+ // See: #11580
+ whiteSpace: 'nowrap'
},
- switchWrap__mainIcons: {
+
+ payments__title__actions__icons__icon: {
backgroundColor: globalStyles.color.braveOrange,
width: '25px',
height: '26px',
@@ -409,15 +413,17 @@ const styles = StyleSheet.create({
backgroundColor: globalStyles.color.braveDarkOrange
}
},
- mainIcons__historyIcon: {
+
+ payments__title__actions__icons__icon_history: {
right: '5px',
- WebkitMaskImage: `url(${historyIcon})`,
+ WebkitMaskImage: `url(${historyIcon})`
+ },
- ':hover': {
- backgroundColor: globalStyles.color.braveDarkOrange
- }
+ payments__title__actions__icons__icon_settings: {
+ WebkitMaskImage: `url(${settingsIcon})`
},
- mainIcons__historyDisabled: {
+
+ payments__title__actions__icons__icon_disabled: {
backgroundColor: globalStyles.color.chromeTertiary,
cursor: 'default',
@@ -425,42 +431,29 @@ const styles = StyleSheet.create({
backgroundColor: globalStyles.color.chromeTertiary
}
},
- mainIcons__settingsIcon: {
- WebkitMaskImage: `url(${settingsIcon})`,
- ':hover': {
- backgroundColor: globalStyles.color.braveDarkOrange
- }
+ switch__switchControl: {
+ // TODO: Refactor switchControls.less
+ padding: '0 !important'
},
- mainIcons__settingsIconDisabled: {
- backgroundColor: globalStyles.color.chromeTertiary,
- cursor: 'default',
- ':hover': {
- backgroundColor: globalStyles.color.chromeTertiary
- }
+ switch__label: {
+ fontWeight: 'bold',
+ color: globalStyles.color.braveOrange
},
- paymentHistoryOverlay__header: {
- paddingLeft: `${paymentStylesVariables.spacing.paymentHistoryTablePadding} !important`
- },
- paymentHistoryOverlay__body: {
- background: '#fff',
- height: '300px',
- overflowY: 'auto',
- padding: '0 !important'
+ switch__label_left: {
+ paddingRight: '.75ch !important'
},
- paymentHistoryOverlay__footer: {
- display: 'block !important',
- paddingLeft: `${paymentStylesVariables.spacing.paymentHistoryTablePadding} !important`,
- paddingTop: '10px !important',
- paddingBottom: '10px !important'
+
+ switch__label_left_off: {
+ color: '#999'
},
- paymentHistoryOverlay__title: {
- // TODO: refactor preferences.less to remove !important
- color: `${globalStyles.color.braveMediumOrange} !important`,
- textIndent: '0 !important'
+ switch__label_right: {
+ // TODO: Add 'position: relative' and 'bottom: 1px' for macOS (en_US) only.
+ paddingLeft: '.75ch !important',
+ color: globalStyles.color.braveOrange
}
})
diff --git a/app/renderer/components/styles/global.js b/app/renderer/components/styles/global.js
index fc95d8c63ba..68ea04f0dfc 100644
--- a/app/renderer/components/styles/global.js
+++ b/app/renderer/components/styles/global.js
@@ -176,7 +176,8 @@ const globalStyles = {
panelMargin: '15px',
panelItemMargin: '12px',
panelPadding: '18px',
- addFundsDialogMinHeight: '250px'
+ addFundsDialogMinHeight: '250px',
+ batIconWidth: '40px'
},
shadow: {
switchShadow: 'inset 0 1px 4px rgba(0, 0, 0, 0.35)',