Skip to content

Commit 604d9fc

Browse files
Style StaySafe Cards
1 parent 7ebe340 commit 604d9fc

File tree

4 files changed

+33
-8
lines changed

4 files changed

+33
-8
lines changed

src/components/Cards.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import styles from "../styles/CardsStyles";
55
function Cards({ title, src, classes }) {
66
return (
77
<div className={classes.card}>
8-
<h1>{title}</h1>
9-
<img src={src} alt={title} />
8+
<h3 className={classes.cardTitle}>{title}</h3>
9+
<img src={src} alt={title} className={classes.cardImage} />
1010
</div>
1111
);
1212
}

src/components/Navbar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class Navbar extends Component {
5454
>
5555
<div className={classes.iconBox}>
5656
<FontAwesomeIcon icon={faFlask} className={classes.icons} />
57-
<p>Test Yourself</p>
57+
<p>Prevention</p>
5858
</div>
5959
</NavLink>
6060
</li>

src/styles/CardsStyles.js

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,31 @@
11
export default {
22
card: {
3-
width: "100%",
4-
flex: "0 0 25%",
5-
padding: "2rem",
3+
display: "flex",
4+
flexDirection: "column",
5+
justifyContent: "center",
6+
alignItems: "center",
7+
flex: "0 0 20%",
8+
padding: "3rem 4rem",
9+
backgroundColor: "#fff",
10+
marginBottom: "7rem",
11+
transition: "all .5s",
12+
boxShadow: `0 1px 2.3px -50px rgba(0, 0, 0, 0.014),
13+
0 2.3px 5.6px -50px rgba(0, 0, 0, 0.02),
14+
0 4.4px 10.5px -50px rgba(0, 0, 0, 0.025),
15+
0 7.8px 18.8px -50px rgba(0, 0, 0, 0.03),
16+
0 14.6px 35.1px -50px rgba(0, 0, 0, 0.036),
17+
0 35px 84px -50px rgba(0, 0, 0, 0.05)`,
18+
19+
"&:hover": {
20+
transform: "scale(1.05)",
21+
},
22+
},
23+
24+
cardTitle: {
25+
textTransform: "capitalize",
26+
},
27+
cardImage: {
28+
display: "block",
29+
backgroundSize: "cover",
630
},
731
};

src/styles/StaySafeStyles.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ export default {
88
},
99
cardsBox: {
1010
display: "flex",
11+
width: "100%",
1112
flexWrap: "wrap",
12-
justifyContent: "center",
13-
alignItems: "center",
13+
justifyContent: "space-around",
14+
alignItems: "stretch",
1415
},
1516
};

0 commit comments

Comments
 (0)