feat: add theme toggle, shared KanbanCard, keyboard shortcuts
Deploy / deploy (push) Successful in 11s
Deploy / deploy (push) Successful in 11s
Previously unstaged files from prior sessions: ThemeContext, ThemeToggle, KanbanCard, useKeyboardShortcuts hook, and updated Header, KanbanBoard, Issues, Tasks, PostProduction, index.css. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import { useTheme } from '../contexts/ThemeContext'
|
||||
import { Moon, Sun } from 'lucide-react'
|
||||
|
||||
export default function ThemeToggle({ className = '' }) {
|
||||
const { darkMode, toggleDarkMode } = useTheme()
|
||||
|
||||
return (
|
||||
<button
|
||||
onClick={toggleDarkMode}
|
||||
className={`p-2 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors ${className}`}
|
||||
title={darkMode ? 'Switch to light mode' : 'Switch to dark mode'}
|
||||
aria-label={darkMode ? 'Switch to light mode' : 'Switch to dark mode'}
|
||||
>
|
||||
{darkMode ? (
|
||||
<Sun className="w-5 h-5 text-yellow-500" />
|
||||
) : (
|
||||
<Moon className="w-5 h-5 text-gray-600" />
|
||||
)}
|
||||
</button>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user