nifty-wallet/ui/app/main-container.js

52 lines
1.4 KiB
JavaScript
Raw Normal View History

2017-07-30 20:42:12 -07:00
const Component = require('react').Component
const h = require('react-hyperscript')
const inherits = require('util').inherits
const TxView = require('./components/tx-view')
2017-08-02 13:32:02 -07:00
const WalletView = require('./components/wallet-view')
2017-08-02 13:03:36 -07:00
const SlideoutMenu = require('react-burger-menu').slide
const AccountAndTransactionDetails = require('./account-and-transaction-details')
2017-07-30 20:42:12 -07:00
module.exports = MainContainer
inherits(MainContainer, Component)
function MainContainer () {
Component.call(this)
}
MainContainer.prototype.render = function () {
2017-07-31 20:46:56 -07:00
// 1. Fixing Mobile View: flush container
// media query for mobile view:
// position: absolute;
// margin-top: 35px;
// width: 100%;
//
// 2. Fix responsive sizing - smaller
// https://puu.sh/x0gDA/5ff3b734eb.png
//
// 3. summarize:
// switch statement goes inside MainContainer,
// or a method in renderPrimary
// - pass resulting h() to MainContainer
// - error checking in separate func
// - router in separate func
2017-08-02 22:09:12 -07:00
//
// 4. style all buttons as <button>s: accessibility + mobile focus
return h('div', {
2017-07-30 20:42:12 -07:00
style: {
position: 'absolute',
marginTop: '35px',
2017-07-30 20:42:12 -07:00
width: '98%',
zIndex: 20,
2017-07-30 21:35:27 -07:00
boxShadow: '0 0 7px 0 rgba(0,0,0,0.08)',
2017-07-31 20:46:56 -07:00
fontFamily: 'DIN OT',
display: 'flex',
flexWrap: 'wrap',
alignItems: 'stretch',
overflowY: 'scroll',
2017-07-30 20:42:12 -07:00
}
}, [h(AccountAndTransactionDetails, {}, [])])
2017-07-30 20:42:12 -07:00
}