feat(settings): reduce animations switch

This commit is contained in:
lobo committed 2026-10-01 15:09:25 +02:00
1 parent fa0857f55d
commit 2ec5833f29
9 files changed
+88 -12

No files matched your search

+9
View File
@@ -34,4 +34,13 @@ describe('Confetti', () => {
expect(container.querySelector('canvas')).toBeNull();
});
it('draws nothing when the reduce animations setting is on', () => {
reducedMotion(false);
document.documentElement.setAttribute('data-reduce-motion', '');
const {container} = render(<Confetti size="small"/>);
document.documentElement.removeAttribute('data-reduce-motion');
expect(container.querySelector('canvas')).toBeNull();
});
});