From 9aa36d156afed581d0a56eadf3818855047b85db Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Tue, 6 Feb 2018 14:47:14 -0500 Subject: [PATCH] move css styles of settings-tab to its own file --- src/app/tabs/settings-tab.js | 77 +--------------------- src/app/tabs/styles/settings-tab-styles.js | 76 +++++++++++++++++++++ 2 files changed, 79 insertions(+), 74 deletions(-) create mode 100644 src/app/tabs/styles/settings-tab-styles.js diff --git a/src/app/tabs/settings-tab.js b/src/app/tabs/settings-tab.js index 1cfab7b5c2..f1d0a94832 100644 --- a/src/app/tabs/settings-tab.js +++ b/src/app/tabs/settings-tab.js @@ -5,83 +5,10 @@ var QueryParams = require('../../lib/query-params') var remixLib = require('remix-lib') var Storage = remixLib.Storage var styleGuide = remixLib.ui.themeChooser - -// -------------- styling ---------------------- -var csjs = require('csjs-inject') -var styles = styleGuide.chooser() var helper = require('../../lib/helper') var modal = require('../ui/modal-dialog-custom') -var css = csjs` - .settingsTabView { - padding: 2%; - display: flex; - } - .info { - ${styles.rightPanel.settingsTab.box_SolidityVersionInfo} - margin-bottom: 1em; - word-break: break-word; - } - .title { - font-size: 1.1em; - font-weight: bold; - margin-bottom: 1em; - } - .crow { - display: flex; - overflow: auto; - clear: both; - padding: .2em; - } - .checkboxText { - font-weight: normal; - } - .crow label { - cursor:pointer; - } - .crowNoFlex { - overflow: auto; - clear: both; - } - .attention { - margin-bottom: 1em; - padding: .5em; - font-weight: bold; - } - .select { - font-weight: bold; - margin-top: 1em; - ${styles.rightPanel.settingsTab.dropdown_SelectCompiler} - } - .heading { - margin-bottom: 0; - } - .explaination { - margin-top: 3px; - margin-bottom: 3px; - } - input { - margin-right: 5px; - cursor: pointer; - } - input[type=radio] { - margin-top: 2px; - } - .pluginTextArea { - font-family: unset; - } - .pluginLoad { - vertical-align: top; - } - i.warnIt { - color: ${styles.appProperties.warningText_Color}; - } - .icon { - margin-right: .5em; - } -} -` -module.exports = SettingsTab +var css = require('./styles/settings-tab-styles') function SettingsTab (container, appAPI, appEvents, opts) { if (typeof container === 'string') container = document.querySelector(container) @@ -305,3 +232,5 @@ function loadVersion (version, queryParams, appAPI, el) { setVersionText('(loading)', el) } } + +module.exports = SettingsTab diff --git a/src/app/tabs/styles/settings-tab-styles.js b/src/app/tabs/styles/settings-tab-styles.js new file mode 100644 index 0000000000..0ad0631794 --- /dev/null +++ b/src/app/tabs/styles/settings-tab-styles.js @@ -0,0 +1,76 @@ +var csjs = require('csjs-inject') +var remixLib = require('remix-lib') +var styleGuide = remixLib.ui.themeChooser +var styles = styleGuide.chooser() + +var css = csjs` + .settingsTabView { + padding: 2%; + display: flex; + } + .info { + ${styles.rightPanel.settingsTab.box_SolidityVersionInfo} + margin-bottom: 1em; + word-break: break-word; + } + .title { + font-size: 1.1em; + font-weight: bold; + margin-bottom: 1em; + } + .crow { + display: flex; + overflow: auto; + clear: both; + padding: .2em; + } + .checkboxText { + font-weight: normal; + } + .crow label { + cursor:pointer; + } + .crowNoFlex { + overflow: auto; + clear: both; + } + .attention { + margin-bottom: 1em; + padding: .5em; + font-weight: bold; + } + .select { + font-weight: bold; + margin-top: 1em; + ${styles.rightPanel.settingsTab.dropdown_SelectCompiler} + } + .heading { + margin-bottom: 0; + } + .explaination { + margin-top: 3px; + margin-bottom: 3px; + } + input { + margin-right: 5px; + cursor: pointer; + } + input[type=radio] { + margin-top: 2px; + } + .pluginTextArea { + font-family: unset; + } + .pluginLoad { + vertical-align: top; + } + i.warnIt { + color: ${styles.appProperties.warningText_Color}; + } + .icon { + margin-right: .5em; + } +} +` + +module.exports = css