refactor debugger tab

pull/1/head
serapath 7 years ago
parent 000c6b1231
commit a09c19c501
  1. 36
      src/app/tabs/debugger-tab.js
  2. 15
      src/app/tabs/styles/debugger-tab-styles.js

@ -1,12 +1,36 @@
var yo = require('yo-yo')
var css = require('./styles/debugger-tab-styles')
var csjs = require('csjs-inject')
var remixLib = require('remix-lib')
function debuggerTab (api = {}, events = {}, opts = {}) {
var el = yo`
var EventManager = remixLib.EventManager
var styles = require('../../ui/styles-guide/theme-chooser').chooser()
module.exports = class DebuggerTab {
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.debuggerTabView} "id="debugView">
<div id="debugger" class="${css.debugger}"></div>
</div>`
return { render () { return el } }
return self._view.el
}
}
module.exports = debuggerTab
const css = csjs`
.debuggerTabView {
padding: 2%;
}
.debugger {
margin-bottom: 1%;
${styles.rightPanel.debuggerTab.box_Debugger}
}
`

@ -1,15 +0,0 @@
var csjs = require('csjs-inject')
var styleGuide = require('../../ui/styles-guide/theme-chooser')
var styles = styleGuide.chooser()
var css = csjs`
.debuggerTabView {
padding: 2%;
}
.debugger {
margin-bottom: 1%;
${styles.rightPanel.debuggerTab.box_Debugger}
}
`
module.exports = css
Loading…
Cancel
Save