From 4eaf5dde11916a7f995aa0edec56904a0891d90e Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Mon, 14 Jan 2019 18:48:00 -0500 Subject: [PATCH] move tabbed menu styles --- src/app/tabs/styles/tabbed-menu-styles.js | 42 ++++++++++++++++++++++ src/app/tabs/tabbed-menu.js | 43 ++--------------------- 2 files changed, 45 insertions(+), 40 deletions(-) create mode 100644 src/app/tabs/styles/tabbed-menu-styles.js diff --git a/src/app/tabs/styles/tabbed-menu-styles.js b/src/app/tabs/styles/tabbed-menu-styles.js new file mode 100644 index 0000000000..f0adb87f55 --- /dev/null +++ b/src/app/tabs/styles/tabbed-menu-styles.js @@ -0,0 +1,42 @@ +const csjs = require('csjs-inject') +const styles = require('../../ui/styles-guide/theme-chooser').chooser() + +const css = csjs` + .menu { + display: flex; + background-color: ${styles.rightPanel.BackgroundColor_Pre}; + list-style: none; + margin: 0; + padding: 0; + } + .active { + background-color: ${styles.rightPanel.backgroundColor_Tab}; + color: ${styles.appProperties.mainText_Color} + } + .options { + float: left; + padding-top: 0.7em; + min-width: 60px; + font-size: 0.9em; + cursor: pointer; + font-size: 1em; + text-align: center; + } + .optionViews { + background-color: ${styles.rightPanel.backgroundColor_Tab}; + overflow: scroll; + height: 100%; + } + .optionViews > div { + display: none; + } + .optionViews .pre { + word-wrap: break-word; + background-color: ${styles.rightPanel.BackgroundColor_Pre}; + border-radius: 3px; + display: inline-block; + padding: 0 0.6em; + } +` + +module.exports = css diff --git a/src/app/tabs/tabbed-menu.js b/src/app/tabs/tabbed-menu.js index 52dbf614bb..ebb59cfb65 100644 --- a/src/app/tabs/tabbed-menu.js +++ b/src/app/tabs/tabbed-menu.js @@ -1,13 +1,12 @@ var yo = require('yo-yo') -var csjs = require('csjs-inject') +var css = require('./styles/tabbed-menu-styles') var globalRegistry = require('../../global/registry') var helper = require('../../lib/helper') -var styles = require('../ui/styles-guide/theme-chooser').chooser() var EventManager = require('../../lib/events') -module.exports = class TabbedMenu { +class TabbedMenu { constructor (localRegistry) { const self = this self.event = new EventManager() @@ -91,40 +90,4 @@ module.exports = class TabbedMenu { } } -const css = csjs` - .menu { - display: flex; - background-color: ${styles.rightPanel.BackgroundColor_Pre}; - list-style: none; - margin: 0; - padding: 0; - } - .active { - background-color: ${styles.rightPanel.backgroundColor_Tab}; - color: ${styles.appProperties.mainText_Color} - } - .options { - float: left; - padding-top: 0.7em; - min-width: 60px; - font-size: 0.9em; - cursor: pointer; - font-size: 1em; - text-align: center; - } - .optionViews { - background-color: ${styles.rightPanel.backgroundColor_Tab}; - overflow: scroll; - height: 100%; - } - .optionViews > div { - display: none; - } - .optionViews .pre { - word-wrap: break-word; - background-color: ${styles.rightPanel.BackgroundColor_Pre}; - border-radius: 3px; - display: inline-block; - padding: 0 0.6em; - } -` +module.exports = TabbedMenu