feat: add dark/light/system theme toggle

Implemented complete theme switching with three modes:
- Light theme
- Dark theme
- System (auto-detect from OS)

Changes:
- Created ModeToggle component with dropdown menu (src/components/mode-toggle.tsx)
- Added theme toggle to desktop header (Index.tsx)
- Enhanced mobile settings with radio group for theme selection (SettingsPage.tsx)
- Changed default theme from "light" to "system" for better UX (App.tsx)

Features:
✅ Seamless theme switching without page reload
✅ Persists user preference in localStorage
✅ System theme auto-detects OS preference
✅ Smooth transitions between themes
✅ Works on both mobile and desktop

Desktop: Theme toggle button in top navigation
Mobile: Theme settings in Settings page with Light/Dark/System options
This commit is contained in:
Claude committed 2025-11-27 13:31:19 +00:00
1 parent cc635f786f
commit 21d3f7057f
4 files changed
+64 -15

No files matched your search

+1 -1
View File
@@ -75,7 +75,7 @@ const App = () => {
return (
<QueryClientProvider client={queryClient}>
<ThemeProvider defaultTheme="light" storageKey="notes-theme">
<ThemeProvider defaultTheme="system" storageKey="notes-theme">
<TooltipProvider>
<BrowserRouter>
<Routes>