mirror of
https://github.com/Snigdha-OS/package-browser.git
synced 2025-09-08 05:35:02 +02:00
⚡️ perf(smooth): removed libs and smooth transition ++
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
import React from 'react';
|
|
||||||
import { Moon, Sun } from 'lucide-react';
|
import { Moon, Sun } from 'lucide-react';
|
||||||
import { useTheme } from '../hooks/useTheme';
|
import { useTheme } from '../hooks/useTheme';
|
||||||
|
|
||||||
@@ -8,14 +7,14 @@ export function ThemeToggle() {
|
|||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
onClick={toggleTheme}
|
onClick={toggleTheme}
|
||||||
className="p-2 rounded-lg bg-nord-8/10 hover:bg-nord-8/20 transition-colors"
|
className="p-3 rounded-full bg-nord-8/10 dark:bg-nord-8/20 hover:bg-nord-8/20 dark:hover:bg-nord-8/30 transition-all ease-in-out duration-300"
|
||||||
aria-label="Toggle theme"
|
aria-label="Toggle theme"
|
||||||
>
|
>
|
||||||
{theme === 'dark' ? (
|
{theme === 'dark' ? (
|
||||||
<Sun className="h-5 w-5 text-nord-4" />
|
<Sun className="h-6 w-6 text-nord-4 transition-transform transform rotate-0 dark:rotate-180" />
|
||||||
) : (
|
) : (
|
||||||
<Moon className="h-5 w-5 text-nord-4" />
|
<Moon className="h-6 w-6 text-nord-4 transition-transform transform rotate-360 dark:rotate-360" />
|
||||||
)}
|
)}
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user