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>
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
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"
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user