Created
May 2, 2018 21:38
-
-
Save cdaz5/750813ce2e394876c1f4ddeb787b0adf to your computer and use it in GitHub Desktop.
index.js
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 from "react"; | |
| import { render } from "react-dom"; | |
| import styled from "styled-components"; | |
| // we import our new loaders | |
| import PulseLoader from "./PulseLoader"; | |
| import BouceLoader from "./BouceLoader"; | |
| // we create a div to hold our components to give them some breathing room | |
| // otherwise they would render on top of each other | |
| const Container = styled.div` | |
| display: flex; | |
| width: 100vw; | |
| height: 100vh; | |
| justify-content: space-around; | |
| align-items: center; | |
| `; | |
| // we pass the loading prop when rendering otherwise they would not show up | |
| const App = () => ( | |
| <Container> | |
| <PulseLoader loading /> | |
| <BouceLoader loading /> | |
| </Container> | |
| ); | |
| render(<App />, document.getElementById("root")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment