aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/main-container.js
blob: 84d8c5435ede5e22ae9908ebe1b17e6a015cce3f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
const Component = require('react').Component
const h = require('react-hyperscript')
const inherits = require('util').inherits
const TxView = require('./components/tx-view')
const WalletView = require('./components/wallet-view')
const SlideoutMenu = require('react-burger-menu').slide
const AccountAndTransactionDetails = require('./account-and-transaction-details')

module.exports = MainContainer

inherits(MainContainer, Component)
function MainContainer () {
  Component.call(this)
}

MainContainer.prototype.render = function () {

  // 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
  //
  //  4. style all buttons as <button>s: accessibility + mobile focus

  return h('div', {
    style: {
      position: 'absolute',
      marginTop: '35px',
      width: '98%',
      zIndex: 20,
      boxShadow: '0 0 7px 0 rgba(0,0,0,0.08)',
      fontFamily: 'DIN OT',
      display: 'flex',
      flexWrap: 'wrap',
      alignItems: 'stretch',
      overflowY: 'scroll',
    }
  }, [h(AccountAndTransactionDetails, {}, [])])
}