Skip to content

Commit 799f86b

Browse files
committed
fix: dropdown in smaller screens
1 parent af77643 commit 799f86b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/components/SortDropdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const SortDropdown: React.FC<SortDropdownProps> = ({
3434
</div>
3535

3636

37-
<div className={`dropdown-content ${showMenu ? "show" : ""}`}>
37+
<div className={`dropdown-content ${showMenu ? "show" : "hidden"}`}>
3838
<div className={`dropdown-item ${"name" === sortField ? "selected" : ""}`} onClick={() => handleSortField("name")}>
3939
{" "}
4040

src/styles/components/SortDropdown.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
display: inline-block;
44
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
55
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
6-
6+
width: 250px;
77
padding: 10px;
88
}
99

@@ -98,8 +98,8 @@ border-radius: 5px 0 0 0 ;
9898

9999

100100

101-
@media (max-width: 768px) {
102-
.dropdown:hover .dropdown-content {
101+
@media (max-width: 1200px) {
102+
.hidden {
103103
display: none;
104104
}
105105

0 commit comments

Comments
 (0)