refactor analysis tab

pull/3094/head
serapath 7 years ago
parent 24621265a6
commit 62483326f9
  1. 38
      src/app/tabs/analysis-tab.js
  2. 26
      src/app/tabs/styles/analysis-tab-styles.js

@ -1,12 +1,32 @@
var yo = require('yo-yo') var yo = require('yo-yo')
var css = require('./styles/analysis-tab-styles') var csjs = require('csjs-inject')
var remixLib = require('remix-lib')
function analysisTab (api = {}, events = {}, opts = {}) { var EventManager = remixLib.EventManager
var el = yo`
<div class="${css.analysisTabView} "id="staticanalysisView">
</div>
`
return { render () { return el } }
}
module.exports = analysisTab module.exports = class AnalysisTab {
constructor (opts = { api: {}, events: {} }) {
const self = this
self.event = new EventManager()
self._api = opts.api
self._events = opts.events
self._view = { el: null }
self.data = {}
self._components = {}
}
render () {
const self = this
if (self._view.el) return self._view.el
self._view.el = yo`
<div class="${css.analysisTabView} "id="staticanalysisView"></div>`
return self._view.el
}
}
const css = csjs`
.analysisTabView {
padding: 2%;
padding-bottom: 3em;
display: flex;
flex-direction: column;
}
`

@ -1,26 +0,0 @@
// -------------- styling ----------------------
var csjs = require('csjs-inject')
var styleGuide = require('../../ui/styles-guide/theme-chooser')
var styles = styleGuide.chooser()
var css = csjs`
.analysisTabView {
padding: 2%;
padding-bottom: 3em;
display: flex;
flex-direction: column;
}
#staticanalysisView {
display: block;
}
.infoBox {
${styles.infoTextBox}
margin-bottom: 1em;
}
.textBox {
${styles.textBoxL}
margin-bottom: 1em;
}
`
module.exports = css
Loading…
Cancel
Save