Files
SlpSoftware/src/components/layout/TransitionOverlay.tsx
T
SluijsensandClaude Sonnet 5.5 0854e3a096 Thema-fundament: variant (B/E) x modus (licht/donker), tijdreis-knop en overgang
Vervangt rood/paars door tokens per variant en modus, voegt ModeToggle en
icoon-knop VariantToggle toe, VariantRenderer met lazy E-chunk, dither-overgang
(uit bij minder beweging), theme-init.js tegen themaflits en tests.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 21:14:11 +01:00

25 lines
669 B
TypeScript

import { usePrefersReducedMotion } from '../../shared/hooks/usePrefersReducedMotion';
import { useTheme } from '../../theme/ThemeProvider';
/**
* Pixel-dither overlay of the time-travel transition (BR-U1-6). Renders nothing while idle and
* nothing at all under prefers-reduced-motion (BR-U1-9).
*/
export function TransitionOverlay() {
const { transition } = useTheme();
const reducedMotion = usePrefersReducedMotion();
if (reducedMotion || transition.phase === 'idle') {
return null;
}
return (
<div
className="tt-overlay"
data-phase={transition.phase}
data-testid="transition-overlay"
aria-hidden="true"
/>
);
}