Last active
June 24, 2019 02:51
-
-
Save methodbox/8c00c1f55df3102f24b868a65079b55e to your computer and use it in GitHub Desktop.
Parce Example - Adding Bootstrap
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 * as React from "react"; | |
import * as ReactDOM from "react-dom"; | |
// Add the following two lines | |
import { Card } from "react-bootstrap"; | |
import "bootstrap/dist/css/bootstrap.css"; | |
class App extends React.Component { | |
render() { | |
return ( | |
// Don't forget to add the classes to the divs and h1 elements. | |
<div className="container"> | |
<div className="row mt-5"> | |
<div className="col-sm"> | |
<h1 className="text-center mb-3">Hello, World.</h1> | |
// Add our card component and styling | |
<Card style={{ maxWidth: "50%" }} className="mx-auto"> | |
<Card.Header>Parcel Example</Card.Header> | |
<Card.Body> | |
<Card.Subtitle className="mb-4 text-muted"> | |
A Parcel.js Example Built with React | |
</Card.Subtitle> | |
<Card.Text> | |
I setup Parcel and built an app in 5 minutes and you can, too! | |
Click the button below to learn more! | |
</Card.Text> | |
<Card.Link | |
className="text-success" | |
href="https://github.com/methodbox/parcel-example" | |
> | |
Learn More | |
</Card.Link> | |
</Card.Body> | |
</Card> | |
</div> | |
</div> | |
</div> | |
); | |
} | |
} | |
const mountApp = document.getElementById("app"); | |
ReactDOM.render(<App />, mountApp); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment