Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Commit

Permalink
fix: dark mode toggle reachable with keyboard (#1931)
Browse files Browse the repository at this point in the history
* Fixing Dark mode toggle is not reachable with keyboard navigation

* Replacing a tag with the button Issue #1927

* Replacing a tag with the button Issue #1927

* Fix margins due to a tag changing to button

Co-authored-by: vasu <vasu@vasus-MacBook-Air.local>
  • Loading branch information
vasucp1207 and vasu authored Nov 5, 2022
1 parent ff35aba commit 80fd19d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/Components/Navbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
}

.theme--button {
margin-left: 1rem;
border: none;
background-color: transparent;
margin-left: 0.5rem;
cursor: pointer;
margin-right: -0.4rem;
}

@media screen and (max-width: 320px) {
Expand Down
4 changes: 2 additions & 2 deletions src/Components/Navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function Navbar({ items, start, end }) {

<div style={theme}>v{version}</div>

<div className="theme--button">
<button className="theme--button">
{darkTheme
? (
<GetIcons
Expand All @@ -56,7 +56,7 @@ function Navbar({ items, start, end }) {
: (
<GetIcons iconName="sun" onClick={toggleTheme} size={20} />
)}
</div>
</button>
</div>
)
}
Expand Down

0 comments on commit 80fd19d

Please sign in to comment.