...
This commit is contained in:
parent
0d25dc4022
commit
53a9d76691
@ -15,7 +15,7 @@ function Navigation() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<nav className="fixed top-0 w-full bg-white dark:bg-slate-900/90 border-b border-slate-200 dark:border-slate-800 z-50">
|
<nav className="fixed top-0 w-full bg-white dark:bg-slate-900 border-b border-slate-200 dark:border-slate-800 z-50">
|
||||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||||
<div className="flex justify-between items-center h-16">
|
<div className="flex justify-between items-center h-16">
|
||||||
<Link to="/" className="flex items-center space-x-2">
|
<Link to="/" className="flex items-center space-x-2">
|
||||||
|
@ -4,7 +4,7 @@ const ThemeToggle = () => {
|
|||||||
const [theme, setTheme] = useState(localStorage.getItem('theme') || 'light');
|
const [theme, setTheme] = useState(localStorage.getItem('theme') || 'light');
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
document.documentElement.setAttribute('data-theme', theme);
|
document.documentElement.classList.toggle('dark', theme === 'dark');
|
||||||
localStorage.setItem('theme', theme);
|
localStorage.setItem('theme', theme);
|
||||||
}, [theme]);
|
}, [theme]);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
@custom-variant dark (&:is(.dark *));
|
/* @custom-variant dark (&:is(.dark *)); */
|
||||||
|
|
||||||
@theme inline {
|
@theme inline {
|
||||||
--radius-sm: calc(var(--radius) - 4px);
|
--radius-sm: calc(var(--radius) - 4px);
|
||||||
|
@ -2,7 +2,7 @@ import typography from '@tailwindcss/typography';
|
|||||||
|
|
||||||
/** @type {import('tailwindcss').Config} */
|
/** @type {import('tailwindcss').Config} */
|
||||||
export default {
|
export default {
|
||||||
darkMode: ['attribute', '[data-theme="dark"]'],
|
darkMode: 'class',
|
||||||
content: [
|
content: [
|
||||||
"./index.html",
|
"./index.html",
|
||||||
"./src/**/*.{js,ts,jsx,tsx}",
|
"./src/**/*.{js,ts,jsx,tsx}",
|
||||||
|
Loading…
Reference in New Issue
Block a user