Skip to content

Commit 98b29bb

Browse files
Make form and Help Page responsive
1 parent dcd78a8 commit 98b29bb

File tree

3 files changed

+48
-5
lines changed

3 files changed

+48
-5
lines changed

src/components/Form.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Form extends Component {
2626
render() {
2727
const { classes } = this.props;
2828
return (
29-
<form onSubmit={this.handleSubmit}>
29+
<form onSubmit={this.handleSubmit} className={classes.form}>
3030
<input
3131
className={classes.input}
3232
name="location"

src/styles/FormStyles.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1+
import sizes from "./sizes";
2+
13
export default {
4+
form: {
5+
// [sizes.down("xs")]: {
6+
// display: "flex",
7+
// flexDirection: "column",
8+
// justifyContent: "center",
9+
// alignItems: "center",
10+
// },
11+
},
12+
213
input: {
314
fontFamily: "inherit",
415
fontSize: "1.6rem",
@@ -9,9 +20,21 @@ export default {
920
margin: "1.5rem",
1021
transition: "all .4s",
1122

23+
[sizes.down("md")]: {
24+
width: "35%",
25+
fontSize: "1.4rem",
26+
padding: "1rem 2rem",
27+
},
28+
29+
[sizes.down("xs")]: {},
30+
1231
"&:focus": {
1332
width: "22%",
1433
outline: "none",
34+
35+
[sizes.down("md")]: {
36+
width: "45%",
37+
},
1538
},
1639

1740
"&::placeholder": {
@@ -32,6 +55,11 @@ export default {
3255
transition: "all .4s",
3356
transform: "translateY(-2px)",
3457
boxShadow: "0 .5rem 1rem rgba(0,0,0,0.2)",
58+
59+
[sizes.down("md")]: {
60+
fontSize: "1.4rem",
61+
padding: "1rem 1.5rem",
62+
},
3563
},
3664

3765
"&:hover": {

src/styles/HelpStyles.js

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,19 @@ export default {
77

88
mainHeading: {
99
marginBottom: "2rem",
10+
11+
[sizes.down("md")]: {
12+
margin: "2rem",
13+
},
14+
[sizes.down("sm")]: {
15+
fontSize: "2rem",
16+
},
1017
},
1118

1219
container: {
1320
marginTop: "3rem",
1421
display: "flex",
15-
justifyContent: "space-between",
22+
justifyContent: "space-around",
1623
flexWrap: "wrap",
1724
},
1825

@@ -21,14 +28,22 @@ export default {
2128
backgroundColor: "#fff",
2229
borderRadius: "1rem",
2330
padding: "3.5rem",
24-
width: "25%",
31+
width: "20%",
2532
display: "flex",
26-
margin: "2rem 0",
33+
margin: "2rem 1rem",
2734
flexDirection: "column",
2835
textAlign: "left",
2936

30-
[sizes.down("md")]: {
37+
[sizes.down("sm")]: {
38+
padding: "2rem",
39+
margin: "1rem",
40+
width: "30%",
41+
},
42+
43+
[sizes.down("xs")]: {
3144
padding: "2rem",
45+
margin: "1rem",
46+
width: "50%",
3247
},
3348
},
3449

0 commit comments

Comments
 (0)