Skip to content

Commit 56a1490

Browse files
Change reload button icon
1 parent 57e46f3 commit 56a1490

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

src/components/CovidApp.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const styles = {
2323
mainContent: {
2424
flex: 1,
2525
padding: "4rem",
26+
position: "relative",
2627
},
2728
header: {
2829
display: "flex",
@@ -54,12 +55,10 @@ class CovidApp extends Component {
5455
}
5556

5657
getData(data, isLoading) {
57-
console.log("isLoading", isLoading);
5858
this.setState({ completeData: data, isLoading: isLoading });
5959
}
6060

6161
loadingStatus(loadingStatus) {
62-
console.log("loadingstatus", loadingStatus);
6362
this.setState({ isLoading: loadingStatus });
6463
}
6564

src/components/Overview.js

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,16 @@ const styles = {
1515
justifyContent: "space-between",
1616
alignItems: "center",
1717
},
18+
btnBox: {
19+
position: "absolute",
20+
top: "-1.5%",
21+
left: "27%",
22+
marginLeft: "2rem",
23+
// transform: "translate(-50%, 0)",
24+
},
1825
button: {
26+
top: "0",
27+
left: "0",
1928
border: "none",
2029
backgroundColor: colors.purple,
2130
padding: "1.5rem 3rem",
@@ -25,15 +34,15 @@ const styles = {
2534
fontSize: "1.6rem",
2635
marginTop: "6rem",
2736
transition: "all .4s",
28-
boxShadow: "0 1.5rem 2.5rem rgba(0,0,0,.2)",
37+
boxShadow: "0 .5rem 1rem rgba(0,0,0,.2)",
2938
position: "relative",
3039

3140
"&:hover": {
3241
backgroundColor: colors.darkPurple,
33-
boxShadow: "0 .5rem 1rem rgba(0,0,0,.2)",
42+
boxShadow: "0 .25rem .5rem rgba(0,0,0,.2)",
3443
outline: "none",
3544
border: "none",
36-
transform: "translateY(-.3rem)",
45+
// transform: "translateY(-.3rem)",
3746

3847
"&::before": {
3948
transform: "scaleX(1.4) scaleY(1.6)",
@@ -179,6 +188,13 @@ class Overview extends Component {
179188

180189
return (
181190
<div className={classes.root}>
191+
<div className={classes.btnBox}>
192+
<FontAwesomeIcon
193+
icon={faSyncAlt}
194+
className={classes.button}
195+
onClick={this.fetchData}
196+
/>
197+
</div>
182198
<div className={classes.panels}>
183199
<DisplayPanels
184200
title="Confirmed"
@@ -205,10 +221,6 @@ class Overview extends Component {
205221
dataChange={dataChange.deaths}
206222
/>
207223
</div>
208-
209-
<button className={classes.button} onClick={this.fetchData}>
210-
Update
211-
</button>
212224
</div>
213225
);
214226
}

0 commit comments

Comments
 (0)