Skip to content

Commit 8665738

Browse files
committed
feat: Add hover highlight classes to Nav links and svgs
1 parent 3044443 commit 8665738

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

components/Header.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ const Header = () => {
3232
<Link
3333
key={link.title}
3434
href={link.href}
35-
className="hidden font-medium text-gray-900 dark:text-gray-100 sm:block"
35+
className="hidden font-medium text-gray-900 hover:text-primary-500 dark:text-gray-100 dark:hover:text-primary-400
36+
sm:block"
3637
>
3738
{link.title}
3839
</Link>

components/MobileNav.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ const MobileNav = () => {
2626
xmlns="http://www.w3.org/2000/svg"
2727
viewBox="0 0 20 20"
2828
fill="currentColor"
29-
className="h-8 w-8 text-gray-900 dark:text-gray-100"
29+
className="h-8 w-8 text-gray-900 hover:text-primary-500 dark:text-gray-100
30+
dark:hover:text-primary-400"
3031
>
3132
<path
3233
fillRule="evenodd"
@@ -46,7 +47,8 @@ const MobileNav = () => {
4647
xmlns="http://www.w3.org/2000/svg"
4748
viewBox="0 0 20 20"
4849
fill="currentColor"
49-
className="text-gray-900 dark:text-gray-100"
50+
className="text-gray-900 hover:text-primary-500 dark:text-gray-100
51+
dark:hover:text-primary-400"
5052
>
5153
<path
5254
fillRule="evenodd"
@@ -61,7 +63,8 @@ const MobileNav = () => {
6163
<div key={link.title} className="px-12 py-4">
6264
<Link
6365
href={link.href}
64-
className="text-2xl font-bold tracking-widest text-gray-900 dark:text-gray-100"
66+
className="text-2xl font-bold tracking-widest text-gray-900 hover:text-primary-500 dark:text-gray-100
67+
dark:hover:text-primary-400"
6568
onClick={onToggleNav}
6669
>
6770
{link.title}

components/SearchButton.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ const SearchButton = () => {
1818
viewBox="0 0 24 24"
1919
strokeWidth={1.5}
2020
stroke="currentColor"
21-
className="h-6 w-6 text-gray-900 dark:text-gray-100"
21+
className="h-6 w-6 text-gray-900 hover:text-primary-500 dark:text-gray-100
22+
dark:hover:text-primary-400"
2223
>
2324
<path
2425
strokeLinecap="round"

components/ThemeSwitch.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const ThemeSwitch = () => {
5656
return (
5757
<div className="mr-5">
5858
<Menu as="div" className="relative inline-block text-left">
59-
<div>
59+
<div className="hover:text-primary-500 dark:hover:text-primary-400">
6060
<Menu.Button>
6161
{mounted ? resolvedTheme === 'dark' ? <Moon /> : <Sun /> : <Blank />}
6262
</Menu.Button>

0 commit comments

Comments
 (0)