on master help sign in
- Make AppNavigation fixed to bottom right
commit3360534b31a98865af39b5e98244b2c2e267967a authorChris Johnson <chris@cjohnson.io> dateMon 1 Apr 2019, 14:06 (8 years ago) parent083d7c6
4 files changed+10−11
src/Bridge.js−4 src/Root.js+5 src/components/AppNavigation.js+5−4 src/walletgen/Walletgen.js−3
src/Bridge.js−4
@@ -287,10 +287,6 @@ class Bridge extends React.Component {
287287 </Col>
288288 </Row>
289289 </Container>
290−
291− <AppNavigation
292− setView={this.props.setView}
293− appView={this.props.appView} />
294290 </React.Fragment>
295291 )
296292 }
src/Root.js+5
@@ -5,6 +5,7 @@ import ReactDOM from 'react-dom'
55
66import Bridge from './Bridge'
77import Walletgen from './walletgen/Walletgen'
8+import { AppNavigation } from './components/AppNavigation'
89
910import './style/index.css'
1011import './walletgen/styles/index.css'
@@ -64,6 +65,10 @@ class Root extends React.Component {
6465 return (
6566 <React.Fragment>
6667 {appComponent}
68+ <AppNavigation
69+ setView={this.setView}
70+ appView={this.state.appView}
71+ />
6772 </React.Fragment>
6873 )
6974 }
src/components/AppNavigation.js+5−4
@@ -21,18 +21,19 @@ class AppNavigation extends React.Component {
2121 if (this.props.appView === "walletgen") buttonText = "Go to Bridge"
2222
2323 let style = {
24− position: "absolute",
25− top: "10px",
24+ position: "fixed",
25+ bottom: "10px",
2626 right: "10px"
2727 }
2828
2929 return (
30− <button
30+ <a
31+ href="javascript:void(0)"
3132 type="button"
3233 style={style}
3334 onClick={this.navigate}>
3435 {buttonText}
35− </button>
36+ </a>
3637 )
3738 }
3839}
src/walletgen/Walletgen.js−3
@@ -142,9 +142,6 @@ class Walletgen extends React.Component {
142142 setGlobalState={ this.setGlobalState }
143143 />
144144 </main>
145− <AppNavigation
146− setView={this.props.setView}
147− appView={this.props.appView} />
148145 </React.Fragment>
149146 );
150147 };