Skip to content

Commit

Permalink
Toggle position changed to remove y-scroll (#1305)
Browse files Browse the repository at this point in the history
* fixed positioning

* fix: fixed edge cases

---------

Co-authored-by: Narayan soni <[email protected]>
  • Loading branch information
Afterdie and narayan954 authored Dec 10, 2023
1 parent f9ed084 commit 10a6665
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/reusableComponents/Darkmode/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,10 @@
.toggle-btn-mui > span > span > input {
cursor: pointer;
}

@media (min-width: 840px){
.toggle-container {
position: absolute;
top: 0px;
}
}
2 changes: 1 addition & 1 deletion src/reusableComponents/Darkmode/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const Darkmode = () => {
};

return (
<div>
<div className={`${location.href.includes('login') ? "toggle-container" : ""}`}>
<button onClick={darkModeToggle} className="theme-toggle-btn">
<CustomizedSwitch modeStatus={modeStatus} />
</button>
Expand Down

0 comments on commit 10a6665

Please sign in to comment.