diff options
development - fix ui dev
Diffstat (limited to 'ui-dev.js')
-rw-r--r-- | ui-dev.js | 51 |
1 files changed, 29 insertions, 22 deletions
@@ -61,30 +61,37 @@ const actions = { var css = MetaMaskUiCss() injectCss(css) -const container = document.querySelector('#test-container') - // parse opts var store = configureStore(states[selectedView]) // start app -render( - h('.super-dev-container', [ - - h(Selector, { actions, selectedKey: selectedView, states, store }), - - h('#app-content', { - style: { - height: '500px', - width: '360px', - boxShadow: 'grey 0px 2px 9px', - margin: '20px', - }, - }, [ - h(Root, { - store: store, - }), - ]), - - ] -), container) +startApp() + +function startApp(){ + const body = document.body + const container = document.createElement('div') + container.id = 'test-container' + body.appendChild(container) + + render( + h('.super-dev-container', [ + + h(Selector, { actions, selectedKey: selectedView, states, store }), + + h('#app-content', { + style: { + height: '500px', + width: '360px', + boxShadow: 'grey 0px 2px 9px', + margin: '20px', + }, + }, [ + h(Root, { + store: store, + }), + ]), + + ] + ), container) +} |