diff --git a/app/renderer/components/common/sectionTitle.js b/app/renderer/components/common/sectionTitle.js new file mode 100644 index 00000000000..d8a6ab0e6a1 --- /dev/null +++ b/app/renderer/components/common/sectionTitle.js @@ -0,0 +1,121 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +const React = require('react') +const ImmutableComponent = require('../immutableComponent') + +const {StyleSheet, css} = require('aphrodite/no-important') +const globalStyles = require('../styles/global') +const commonStyles = require('../styles/commonStyles') + +class SectionTitleWrapper extends ImmutableComponent { + render () { + return
+ } +} + +class SectionTitleLabelWrapper extends ImmutableComponent { + render () { + return + } +} + +class DefaultSectionTitle extends ImmutableComponent { + render () { + return
+

+

+ } +} + +class AboutPageSectionTitle extends ImmutableComponent { + render () { + return
+ } +} + +class AboutPageSectionSubTitle extends ImmutableComponent { + render () { + return + } +} + +class SectionLabelTitle extends ImmutableComponent { + render () { + return + } +} + +const styles = StyleSheet.create({ + sectionTitleWrapper: { + marginBottom: '0.7rem', + display: 'flex', + alignItems: 'flex-end' + }, + + sectionTitle: { + color: globalStyles.color.darkGray, + cursor: 'default', + fontSize: '1.2rem', + margin: 0, + + // Copied from common.less + fontWeight: 400, + WebkitFontSmoothing: 'antialiased' + }, + prefSectionTitle: { + color: globalStyles.color.braveOrange, + fontSize: '1.75rem' + }, + sectionLabelTitle: { + color: '#999', + fontSize: '15px' + }, + + aboutPageSectionTitle: { + display: 'inline-block' + }, + aboutPageSectionSubTitle: { + fontSize: '16px', + marginBottom: '12px', + + // cf: .siteDetailsPage .siteDetailsPageContent + marginTop: '24px' + } +}) + +const sectionTitleStyles = StyleSheet.create({ + beta: { + display: 'flex', + alignItems: 'flex-start' + } +}) + +module.exports = { + sectionTitleStyles, + + SectionTitleWrapper, + SectionTitleLabelWrapper, + + DefaultSectionTitle, + SectionLabelTitle, + AboutPageSectionTitle, + AboutPageSectionSubTitle +} diff --git a/app/renderer/components/commonForm.js b/app/renderer/components/commonForm.js index 74d17a1cbb3..b3bef6a68de 100644 --- a/app/renderer/components/commonForm.js +++ b/app/renderer/components/commonForm.js @@ -99,7 +99,7 @@ const styles = StyleSheet.create({ }, CommonFormSubSection: { - margin: `0 0 0 ${globalStyles.spacing.dialogInsideMargin}` + margin: `0 0 ${globalStyles.spacing.dialogInsideMargin} ${globalStyles.spacing.dialogInsideMargin}` }, CommonFormBottomWrapper: { diff --git a/app/renderer/components/importBrowserDataPanel.js b/app/renderer/components/importBrowserDataPanel.js index 5372bb8d488..2bdfee948d0 100644 --- a/app/renderer/components/importBrowserDataPanel.js +++ b/app/renderer/components/importBrowserDataPanel.js @@ -18,7 +18,6 @@ const { CommonFormDropdown, CommonFormSection, CommonFormTitle, - CommonFormSubSection, CommonFormButtonWrapper, CommonFormBottomWrapper } = require('./commonForm') @@ -150,14 +149,14 @@ class ImportBrowserDataPanel extends ImmutableComponent { onClick={this.onToggleFavorites} disabled={!this.supportFavorites} /> - +
- +
-
-

-

+ -
- Brave Payments - beta + + { /* Note: This div cannot be replaced with SectionTitleLabelWrapper */ } +
+ Brave Payments + beta
-
+
{ this.enabled ? -
+
@@ -80,7 +83,7 @@ class PluginsTab extends ImmutableComponent { { !isLinux() ?
-
+ diff --git a/app/renderer/components/preferences/syncTab.js b/app/renderer/components/preferences/syncTab.js index 0d9750961c9..b4c20d7d130 100644 --- a/app/renderer/components/preferences/syncTab.js +++ b/app/renderer/components/preferences/syncTab.js @@ -14,6 +14,13 @@ const Button = require('../../../../js/components/button') const {SettingsList, SettingItem, SettingCheckbox} = require('../settings') const SortableTable = require('../../../../js/components/sortableTable') +const { + SectionTitleLabelWrapper, + AboutPageSectionTitle, + DefaultSectionTitle, + SectionLabelTitle +} = require('../common/sectionTitle') + const aboutActions = require('../../../../js/about/aboutActions') const getSetting = require('../../../../js/settings').getSetting const settings = require('../../../../js/constants/settings') @@ -49,7 +56,7 @@ class SyncTab extends ImmutableComponent { get clearDataContent () { return
-
+ { this.enabled ?