Files
blackcanyontickets/reactrebuild0825/src/components/ThemeToggle.tsx
dzinesco 6d879d0685 feat(theme): finalize design token system with WCAG AA compliance
- Fix gold text contrast in light theme from 3.30:1 to 6.38:1 (AA compliant)
- Separate ThemeContext into definition and provider files for ESLint compliance
- Update contrast report with final validation results (100% passing tests)
- Ensure all accent colors meet WCAG AA standards across light/dark themes
- Complete design token system with proper semantic color roles

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-16 02:21:19 -06:00

15 lines
405 B
TypeScript

import { useTheme } from '../hooks/useTheme';
export function ThemeToggle() {
const { theme, toggleTheme } = useTheme();
return (
<button
onClick={toggleTheme}
className="glass-button-gold"
aria-label={`Switch to ${theme === 'light' ? 'dark' : 'light'} theme`}
>
{theme === 'light' ? '🌙' : '☀️'} {theme === 'light' ? 'Dark' : 'Light'} Mode
</button>
);
}