Files
convert/frontend/src/components/ThemeToggle.jsx
T
anthony ee18cc2d90 feat(frontend): add design tokens, dark mode hook, and i18n scaffold
Part of the Ombrora Convert redesign (Task 1/5).
2026-07-31 14:49:19 +02:00

11 lines
379 B
React

import { Moon, Sun } from '@phosphor-icons/react';
export function ThemeToggle({ theme, onToggle, label }) {
const isDark = theme === 'dark';
return (
<button type="button" className="theme-toggle" onClick={onToggle} aria-label={label} aria-pressed={isDark}>
{isDark ? <Sun size={20} weight="regular" /> : <Moon size={20} weight="regular" />}
</button>
);
}