parent
789e6395a4
commit
7fa471d70c
@ -0,0 +1,56 @@ |
|||||||
|
var csjs = require('csjs-inject') |
||||||
|
var styleGuide = require('../../ui/styles-guide/theme-chooser') |
||||||
|
var styles = styleGuide.chooser() |
||||||
|
|
||||||
|
var css = csjs` |
||||||
|
.opts_li { |
||||||
|
display: block; |
||||||
|
font-weight: bold; |
||||||
|
color: ${styles.rightPanel.text_Teriary}; |
||||||
|
} |
||||||
|
.opts_li.active { |
||||||
|
color: ${styles.rightPanel.text_Primary}; |
||||||
|
} |
||||||
|
.opts_li:hover { |
||||||
|
color: ${styles.rightPanel.icon_HoverColor_TogglePanel}; |
||||||
|
} |
||||||
|
.solIcon { |
||||||
|
margin-left: 10px; |
||||||
|
margin-right: 30px; |
||||||
|
display: flex; |
||||||
|
align-self: center; |
||||||
|
height: 29px; |
||||||
|
width: 20px; |
||||||
|
background-color: ${styles.colors.transparent}; |
||||||
|
} |
||||||
|
a { |
||||||
|
color: ${styles.rightPanel.text_link}; |
||||||
|
} |
||||||
|
#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; |
||||||
|
} |
||||||
|
#optionViews .hide { |
||||||
|
display: none; |
||||||
|
} |
||||||
|
.infoBox { |
||||||
|
${styles.infoTextBox} |
||||||
|
margin-bottom: 1em; |
||||||
|
} |
||||||
|
.textBox { |
||||||
|
${styles.textBoxL} |
||||||
|
margin-bottom: 1em; |
||||||
|
} |
||||||
|
.icon { |
||||||
|
height: 70%; |
||||||
|
margin-right: 2%; |
||||||
|
} |
||||||
|
` |
||||||
|
|
||||||
|
module.exports = css |
@ -1,87 +1,49 @@ |
|||||||
// var yo = require('yo-yo')
|
var yo = require('yo-yo') |
||||||
// var csjs = require('csjs-inject')
|
|
||||||
// var remixLib = require('remix-lib')
|
|
||||||
//
|
|
||||||
// var EventManager = remixLib.EventManager
|
|
||||||
// var styles = remixLib.ui.themeChooser.chooser()
|
|
||||||
//
|
|
||||||
// module.exports = class TestTab {
|
|
||||||
// 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.testTab}>
|
|
||||||
// Test Tab
|
|
||||||
// </div>`
|
|
||||||
// return self._view.el
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// const css = csjs`
|
|
||||||
// .testTab {
|
|
||||||
// position : relative;
|
|
||||||
// box-sizing : border-box;
|
|
||||||
// display : flex;
|
|
||||||
// flex-direction : column;
|
|
||||||
// align-items : center;
|
|
||||||
// }
|
|
||||||
// `
|
|
||||||
|
|
||||||
/* |
var css = require('./styles/test-tab-styles') |
||||||
.opts_li { |
|
||||||
display: block; |
var remixTests = require('remix-tests') |
||||||
font-weight: bold; |
|
||||||
color: ${styles.rightPanel.text_Teriary}; |
function runTests () { |
||||||
} |
// remixTests.runTest(testName, testObject, testCallback, resultsCallback)
|
||||||
.opts_li.active { |
let contractSources = api.compilerContracts.getSources() |
||||||
color: ${styles.rightPanel.text_Primary}; |
remixTests.runTestSources(contractSources) |
||||||
} |
|
||||||
.opts_li:hover { |
|
||||||
color: ${styles.rightPanel.icon_HoverColor_TogglePanel}; |
|
||||||
} |
|
||||||
.solIcon { |
|
||||||
margin-left: 10px; |
|
||||||
margin-right: 30px; |
|
||||||
display: flex; |
|
||||||
align-self: center; |
|
||||||
height: 29px; |
|
||||||
width: 20px; |
|
||||||
background-color: ${styles.colors.transparent}; |
|
||||||
} |
|
||||||
a { |
|
||||||
color: ${styles.rightPanel.text_link}; |
|
||||||
} |
|
||||||
#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; |
|
||||||
} |
|
||||||
#optionViews .hide { |
|
||||||
display: none; |
|
||||||
} |
} |
||||||
.infoBox { |
|
||||||
${styles.infoTextBox} |
function testTabView () { |
||||||
margin-bottom: 1em; |
return yo` |
||||||
|
<div class="${css.testTabView} "id="testView"> |
||||||
|
<div> |
||||||
|
<div class="${css.infoBox}"> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="${css.testList}"> |
||||||
|
<p><button onclick=${runTests}>Run Tests</button></p> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
` |
||||||
} |
} |
||||||
.textBox { |
|
||||||
${styles.textBoxL} |
function testTab (api = {}, events = {}, opts = {}) { |
||||||
margin-bottom: 1em; |
window.api = api |
||||||
|
console.dir('------') |
||||||
|
console.dir(api) |
||||||
|
let el = testTabView('') |
||||||
|
let gitterIsLoaded = false |
||||||
|
|
||||||
|
// api.compilerContracts.getSources()
|
||||||
|
|
||||||
|
events.app.register('tabChanged', (tabName) => { |
||||||
|
if (tabName !== 'test' || gitterIsLoaded) { |
||||||
|
return |
||||||
} |
} |
||||||
.icon { |
|
||||||
height: 70%; |
yo.update(el, testTabView()) |
||||||
margin-right: 2%; |
el.style.display = 'block' |
||||||
|
gitterIsLoaded = true |
||||||
|
}) |
||||||
|
|
||||||
|
return { render () { return el } } |
||||||
} |
} |
||||||
*/ |
|
||||||
|
module.exports = testTab |
||||||
|
Loading…
Reference in new issue