Skip to content

Commit 0c7f864

Browse files
author
hafsa
committed
Fix responsive button and remove extra spacing on mobile screens
1 parent d3fdcee commit 0c7f864

File tree

4 files changed

+24
-3
lines changed

4 files changed

+24
-3
lines changed

package-lock.json

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
"test": "react-scripts test",
2929
"eject": "react-scripts eject",
3030
"format": "prettier --write \"./**/*.{js,css,json,scss}\"",
31-
"check-format": "prettier -c \"./**/*.{js,css,json,scss}\""
31+
"check-format": "prettier -c \"./**/*.{js,css,json,scss}\"",
32+
"dev": "react-scripts start"
3233
},
3334
"eslintConfig": {
3435
"extends": "react-app"
@@ -52,7 +53,7 @@
5253
},
5354
"devDependencies": {
5455
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
55-
"dotenv": "^8.2.0",
56+
"dotenv": "^8.6.0",
5657
"prettier": "^2.3.1"
5758
}
5859
}

src/components/button/Button.scss

+9
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,17 @@
4040
margin-right: 0px;
4141
}
4242
}
43+
4344
@media (max-width: 320px) {
4445
.main-button {
4546
font-size: 0.75rem;
4647
}
4748
}
49+
50+
@media (max-width: 435px) {
51+
.main-button {
52+
font-size: 12px;
53+
margin-right: 15px;
54+
55+
}
56+
}

src/index.css

+10
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,13 @@ body {
3434
line-height: normal;
3535
}
3636
}
37+
38+
39+
/* hide the overflow */
40+
@media (max-width: 400px) {
41+
html,
42+
body {
43+
overflow-x: hidden;
44+
overflow-y: auto;
45+
}
46+
}

0 commit comments

Comments
 (0)