Skip to content

Commit

Permalink
Fixed the button inside a button issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Hudamabkhoot committed Oct 17, 2024
1 parent 2e95a70 commit e30b32e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
8 changes: 2 additions & 6 deletions src/components/NavBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,7 @@ export function NavBar({ darkMode, toggleDarkMode }) {
darkMode ? 'Switch to light mode' : 'Switch to dark mode'
}
>
<button className=" rounded-full text-primary-pink hover:text-opacity-60">
{darkMode ? <Eclipse /> : <Sun />}
</button>
{darkMode ? <Eclipse /> : <Sun />}
</abbr>
</Button>
</div>
Expand Down Expand Up @@ -103,9 +101,7 @@ export function NavBar({ darkMode, toggleDarkMode }) {
darkMode ? 'Switch to light mode' : 'Switch to dark mode'
}
>
<button className="px-2 rounded-full text-primary-pink hover:text-opacity-60">
{darkMode ? <Eclipse /> : <Sun />}
</button>
{darkMode ? <Eclipse /> : <Sun />}
</abbr>
</Button>
{!!user ? (
Expand Down
10 changes: 5 additions & 5 deletions src/views/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ function Login() {
className="fixed w-16 bottom-16 right-16 p-2 rounded-full text-primary-pink hover:text-primary-pink hover:text-opacity-60 font-semibold"
>
<abbr title={darkMode ? 'Switch to light mode' : 'Switch to dark mode'}>
<button
className={`${darkMode && 'dark'} rounded-full text-primary-pink hover:text-opacity-60`}
>
{darkMode ? <Eclipse /> : <Sun />}
</button>
{darkMode ? (
<Eclipse className="w-8 h-8" />
) : (
<Sun className="w-8 h-8" />
)}
</abbr>
</Button>
</div>
Expand Down

0 comments on commit e30b32e

Please sign in to comment.