Skip to content

Commit c7ab583

Browse files
Add footer
1 parent b9e5173 commit c7ab583

File tree

5 files changed

+64
-1
lines changed

5 files changed

+64
-1
lines changed

src/App.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import Navbar from "./components/Navbar";
66
import { Switch, Route } from "react-router-dom";
77
import StaySafe from "./components/StaySafe";
88
import Help from "./components/Help";
9+
import Footer from "./components/Footer";
910

1011
class App extends Component {
1112
constructor(props) {
@@ -55,6 +56,7 @@ class App extends Component {
5556
</Switch>
5657
</div>
5758
</div>
59+
{/* <Footer /> */}
5860
</Paper>
5961
);
6062
}

src/components/CovidApp.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import stateCodes from "../constants/stateCodes";
1515
import Lottie from "react-lottie";
1616
import * as animationData from "../assets/loading.json";
1717
import FadeIn from "react-fade-in";
18+
import Footer from "./Footer";
1819

1920
const defaultOptions = {
2021
loop: true,
@@ -236,6 +237,7 @@ class CovidApp extends Component {
236237
/>
237238
</div>
238239
</div>
240+
<Footer />
239241
</FadeIn>
240242
);
241243
}

src/components/Footer.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import React, { Component } from "react";
2+
import { withStyles } from "@material-ui/styles";
3+
import styles from "../styles/FooterStyles.js";
4+
import classNames from "classnames";
5+
6+
class Footer extends Component {
7+
render() {
8+
const { classes } = this.props;
9+
return (
10+
<footer className={classes.footer}>
11+
<button className={classNames(classes.btn, classes.github)}>
12+
Contribute on Github
13+
</button>
14+
<button className={classNames(classes.btn, classes.twitter)}>
15+
Share on Twitter
16+
</button>
17+
<button className={classNames(classes.btn, classes.issue)}>
18+
Report an Issue
19+
</button>
20+
</footer>
21+
);
22+
}
23+
}
24+
export default withStyles(styles)(Footer);

src/components/Form.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ export default class Form extends Component {
2323
render() {
2424
return (
2525
<form onSubmit={this.handleSubmit}>
26-
<p>{this.state.area}</p>
2726
<input
2827
name="area"
2928
type="text"

src/styles/FooterStyles.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
export default {
2+
footer: {
3+
display: "flex",
4+
justifyContent: "space-around",
5+
marginTop: "3rem",
6+
padding: "4rem",
7+
},
8+
btn: {
9+
padding: "1.5rem 4rem",
10+
fontFamily: "inherit",
11+
border: "none",
12+
fontSize: "1.7rem",
13+
borderRadius: "2rem",
14+
color: "white",
15+
transition: "all .3s",
16+
transform: "translateY(-.5rem)",
17+
boxShadow: "0 .5rem 2rem rgba(0,0,0,.5)",
18+
19+
"&:hover": {
20+
transform: "translateY(0)",
21+
boxShadow: "0 .25rem 1rem rgba(0,0,0,.25)",
22+
},
23+
},
24+
25+
github: {
26+
backgroundColor: "black",
27+
},
28+
29+
twitter: {
30+
backgroundColor: "#00acee",
31+
},
32+
33+
issue: {
34+
backgroundColor: "#817C9B",
35+
},
36+
};

0 commit comments

Comments
 (0)