Skip to content

Commit e30b32e

Browse files
committed
Fixed the button inside a button issue
1 parent 2e95a70 commit e30b32e

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

src/components/NavBar.jsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,7 @@ export function NavBar({ darkMode, toggleDarkMode }) {
6868
darkMode ? 'Switch to light mode' : 'Switch to dark mode'
6969
}
7070
>
71-
<button className=" rounded-full text-primary-pink hover:text-opacity-60">
72-
{darkMode ? <Eclipse /> : <Sun />}
73-
</button>
71+
{darkMode ? <Eclipse /> : <Sun />}
7472
</abbr>
7573
</Button>
7674
</div>
@@ -103,9 +101,7 @@ export function NavBar({ darkMode, toggleDarkMode }) {
103101
darkMode ? 'Switch to light mode' : 'Switch to dark mode'
104102
}
105103
>
106-
<button className="px-2 rounded-full text-primary-pink hover:text-opacity-60">
107-
{darkMode ? <Eclipse /> : <Sun />}
108-
</button>
104+
{darkMode ? <Eclipse /> : <Sun />}
109105
</abbr>
110106
</Button>
111107
{!!user ? (

src/views/Login.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ function Login() {
4646
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"
4747
>
4848
<abbr title={darkMode ? 'Switch to light mode' : 'Switch to dark mode'}>
49-
<button
50-
className={`${darkMode && 'dark'} rounded-full text-primary-pink hover:text-opacity-60`}
51-
>
52-
{darkMode ? <Eclipse /> : <Sun />}
53-
</button>
49+
{darkMode ? (
50+
<Eclipse className="w-8 h-8" />
51+
) : (
52+
<Sun className="w-8 h-8" />
53+
)}
5454
</abbr>
5555
</Button>
5656
</div>

0 commit comments

Comments
 (0)