Skip to content

Commit

Permalink
Fix responsive button and remove extra spacing on mobile screens
Browse files Browse the repository at this point in the history
  • Loading branch information
hafsa committed Oct 4, 2024
1 parent d3fdcee commit 0c7f864
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
3 changes: 2 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"test": "react-scripts test",
"eject": "react-scripts eject",
"format": "prettier --write \"./**/*.{js,css,json,scss}\"",
"check-format": "prettier -c \"./**/*.{js,css,json,scss}\""
"check-format": "prettier -c \"./**/*.{js,css,json,scss}\"",
"dev": "react-scripts start"
},
"eslintConfig": {
"extends": "react-app"
Expand All @@ -52,7 +53,7 @@
},
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"dotenv": "^8.2.0",
"dotenv": "^8.6.0",
"prettier": "^2.3.1"
}
}
9 changes: 9 additions & 0 deletions src/components/button/Button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,17 @@
margin-right: 0px;
}
}

@media (max-width: 320px) {
.main-button {
font-size: 0.75rem;
}
}

@media (max-width: 435px) {
.main-button {
font-size: 12px;
margin-right: 15px;

}
}
10 changes: 10 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,13 @@ body {
line-height: normal;
}
}


/* hide the overflow */
@media (max-width: 400px) {
html,
body {
overflow-x: hidden;
overflow-y: auto;
}
}

0 comments on commit 0c7f864

Please sign in to comment.