Last active
May 8, 2019 12:40
-
-
Save ryanjyost/97b693bbfe079f348e6fd0b396411d2a to your computer and use it in GitHub Desktop.
App.js #1 in React Responsive Tutorial
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from "react"; | |
| import TopBar from "./components/TopBar"; | |
| import FooterMenu from "./components/FooterMenu"; | |
| import Content from "./components/Content"; | |
| class App extends Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = {}; | |
| } | |
| render() { | |
| const styles = { | |
| white: (opacity = 1) => `rgba(255, 255, 255, ${opacity})`, | |
| black: (opacity = 1) => `rgba(0, 0, 0, ${opacity})`, | |
| topBarHeight: 40, | |
| footerMenuHeight: 50 | |
| }; | |
| const menuItems = [ | |
| { icon: `π`, text: "Item 1" }, | |
| { icon: `π`, text: "Item 2" }, | |
| { icon: `π`, text: "Item 3" }, | |
| { icon: `π€`, text: "Item 4" }, | |
| { icon: `π`, text: "Item 5" } | |
| ]; | |
| return ( | |
| <div | |
| style={{ | |
| backgroundColor: styles.black(0.05), | |
| minHeight: "100vh", | |
| position: "relative" | |
| }} | |
| > | |
| <TopBar styles={styles} /> | |
| <Content styles={styles} /> | |
| <FooterMenu menuItems={menuItems} styles={styles} /> | |
| </div> | |
| ); | |
| } | |
| } | |
| export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment