Skip to content

Commit 30094ec

Browse files
committed
fix theme toggle not working on mobile
1 parent 2762f48 commit 30094ec

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

portfolio/src/components/ThemeToggle.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
'use client';
22

3-
// src/components/ThemeToggle.tsx
43
import React from 'react';
54
import { Sun, Moon } from 'lucide-react';
65
import { useTheme } from '../context/ThemeContext';
@@ -11,9 +10,9 @@ const ThemeToggle: React.FC = () => {
1110
return (
1211
<button
1312
onClick={toggleTheme}
14-
className="fixed top-4 right-4 p-2 border group transition-all duration-100
13+
className="fixed top-2 right-2 md:top-4 md:right-4 p-2 border group transition-all duration-100
1514
dark:border-white dark:hover:bg-white dark:hover:text-black
16-
border-black hover:bg-black hover:text-white"
15+
border-black hover:bg-black hover:text-white z-50"
1716
>
1817
{theme === 'dark' ? (
1918
<div className="relative">

0 commit comments

Comments
 (0)