feat(theme): motion presets (timing, easing, stagger)
This commit is contained in:
1 parent
423ca930d7
commit
fc38498a5b
3 files changed
+55
No files matched your search
@@ -0,0 +1,24 @@
|
||||
import { motion } from '../theme/motion';
|
||||
|
||||
describe('motion', () => {
|
||||
it('exports bezier strings for easing presets', () => {
|
||||
expect(motion.easeOutQuart).toBe('cubic-bezier(0.25, 1, 0.5, 1)');
|
||||
expect(motion.easeOutExpo).toBe('cubic-bezier(0.16, 1, 0.3, 1)');
|
||||
expect(motion.easeOutBack).toBe('cubic-bezier(0.34, 1.56, 0.64, 1)');
|
||||
expect(motion.easeInOutQuart).toBe('cubic-bezier(0.76, 0, 0.24, 1)');
|
||||
});
|
||||
|
||||
it('exports duration presets in ms', () => {
|
||||
expect(motion.duration.instant).toBe(80);
|
||||
expect(motion.duration.fast).toBe(160);
|
||||
expect(motion.duration.normal).toBe(240);
|
||||
expect(motion.duration.slow).toBe(380);
|
||||
expect(motion.duration.pulse).toBe(800);
|
||||
expect(motion.duration.pulseSlow).toBe(1600);
|
||||
});
|
||||
|
||||
it('exports stagger offsets', () => {
|
||||
expect(motion.stagger.row).toBe(50);
|
||||
expect(motion.stagger.item).toBe(80);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user