-
+
+ { /* Note: This div cannot be replaced with SectionTitleLabelWrapper */ }
+
+
Brave Payments
+
beta
+
+
+
- {
- this.enabled
- ?
+ {
+ this.enabled
+ ?
- : null
- }
-
+ : null
+ }
+
+
{
this.enabled
@@ -278,6 +280,23 @@ class PaymentsTab extends ImmutableComponent {
}
}
+const gridStyles = StyleSheet.create({
+ row1col1: {
+ gridRow: 1,
+ gridColumn: 1
+ },
+
+ row1col2: {
+ gridRow: 1,
+ gridColumn: 2
+ },
+
+ row1col3: {
+ gridRow: 1,
+ gridColumn: 3
+ }
+})
+
const styles = StyleSheet.create({
flexAlignCenter: {
display: 'flex',
@@ -290,22 +309,26 @@ const styles = StyleSheet.create({
width: '805px',
paddingBottom: '40px' // cf: padding of .prefTabContainer
},
- paymentsSwitches: {
- display: 'flex',
- position: 'relative',
- bottom: '2px',
- minHeight: '29px'
- },
titleWrapper: {
+ display: 'grid',
+ gridTemplateColumns: '1fr 1fr 1fr',
+ alignItems: 'center',
+ width: '100%',
+ padding: `0 ${globalStyles.spacing.panelPadding}`
+ },
+
+ titleWrapper__title: {
position: 'relative',
- marginRight: '49px',
- minWidth: '240px'
+ right: globalStyles.spacing.panelPadding
},
- switchWrap: {
- width: paymentStyles.width.tableCell
+ titleWrapper__switchWrap: {
+ display: 'flex',
+ alignItems: 'center',
+ width: '100%'
},
+
switchWrap__switchSpan: {
color: '#999',
fontWeight: 'bold'
@@ -315,8 +338,10 @@ const styles = StyleSheet.create({
color: globalStyles.color.braveOrange
},
switchWrap__right: {
+ display: 'flex',
+ alignItems: 'center',
justifyContent: 'space-between',
- position: 'relative'
+ width: `calc(100% + ${globalStyles.spacing.panelPadding})`
},
// Auto suggest switch
@@ -336,6 +361,7 @@ const styles = StyleSheet.create({
position: 'relative',
left: '3px',
cursor: 'pointer',
+ fontSize: globalStyles.payments.fontSize.regular,
// TODO: refactor preferences.less to remove !important
':hover': {
@@ -346,7 +372,6 @@ const styles = StyleSheet.create({
// History and settings icons
switchWrap__mainIconsRight: {
position: 'relative',
- right: '12px',
top: '3.5px'
},
switchWrap__mainIcons: {
diff --git a/app/renderer/components/styles/global.js b/app/renderer/components/styles/global.js
index ba410e53cff..752fdabc990 100644
--- a/app/renderer/components/styles/global.js
+++ b/app/renderer/components/styles/global.js
@@ -305,6 +305,10 @@ const globalStyles = {
action: {
backgroundColor: '#4099FF',
hoverColor: '#000'
+ },
+
+ panel: {
+ width: '180px'
}
},
@@ -329,6 +333,13 @@ const globalStyles = {
background: '#ccc'
}
}
+ },
+
+ // TODO (Suguru): move them to payment.js after style refactoring is done
+ payments: {
+ fontSize: {
+ regular: '14.5px'
+ }
}
}
diff --git a/app/renderer/components/styles/payment.js b/app/renderer/components/styles/payment.js
index 211d53bb54a..6f39d0112f1 100644
--- a/app/renderer/components/styles/payment.js
+++ b/app/renderer/components/styles/payment.js
@@ -4,16 +4,6 @@
const globalStyles = require('./global')
-const paymentStyles = {
- font: {
- regular: '14.5px'
- },
- width: {
- tableRow: '235px',
- tableCell: '265px' // width.tableRow + 30px
- }
-}
-
const paymentStylesVariables = {
spacing: {
paymentHistoryTablePadding: '30px'
@@ -26,6 +16,5 @@ const paymentStylesVariables = {
}
module.exports = {
- paymentStyles,
paymentStylesVariables
}
diff --git a/js/about/styles.js b/js/about/styles.js
index d4fe67d9b78..730ae9b5ffc 100644
--- a/js/about/styles.js
+++ b/js/about/styles.js
@@ -11,7 +11,15 @@ require('../../node_modules/font-awesome/css/font-awesome.css')
const {Textbox, FormTextbox, SettingTextbox, RecoveryKeyTextbox} = require('../../app/renderer/components/common/textbox')
const {TextArea, DefaultTextArea} = require('../../app/renderer/components/common/textbox')
-const {Dropdown, FormDropdown, SettingDropdown, BraveryPanelDropdown} = require('../../app/renderer/components/common/dropdown')
+
+const {
+ Dropdown,
+ FormDropdown,
+ SettingDropdown,
+ PanelDropdown,
+ BraveryPanelDropdown
+} = require('../../app/renderer/components/common/dropdown')
+
const BrowserButton = require('../../app/renderer/components/common/browserButton')
const {
@@ -225,6 +233,23 @@ class AboutStyle extends ImmutableComponent {
+
+ Dropdown used on Brave Payments; has 180px width (same as Panel Item button below)
+
+
+
+
+
+
+ const { '{PanelDropdown}' } = require('../../app/renderer/components/common/dropdown'){'\n'}
+ <PanelDropdown>{'\n'}
+ <option>5 USD</option>{'\n'}
+ <option>10 USD</option>{'\n'}
+ <option>15 USD</option>{'\n'}
+ </PanelDropdown>
+
+
+
Dropdown used mostly on Bravery Panel; has 100% width and 13px font size