Skip to content
This repository was archived by the owner on Aug 19, 2022. It is now read-only.

Commit b54f569

Browse files
author
Brandon Dail
committed
Add zoomInLeft animation
1 parent 97a1d2c commit b54f569

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

src/components/zoomInLeft.js

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// @flow
2+
import {
3+
compose,
4+
scale3d,
5+
translate3d,
6+
cubicBezier,
7+
} from '../utils';
8+
import type { Animation } from '../types';
9+
10+
const scaleAndTranslate = compose(scale3d, translate3d);
11+
12+
const zoomInLeft: Animation = {
13+
from: {
14+
opacity: 0,
15+
transform: scaleAndTranslate(
16+
[0.1, 0.1, 0.1],
17+
['-1000px', 0, 0]
18+
),
19+
animationTimingFunction: cubicBezier(
20+
0.550,
21+
0.055,
22+
0.675,
23+
0.190
24+
),
25+
},
26+
'60%': {
27+
opacity: 1,
28+
transform: scaleAndTranslate(
29+
[0.475, 0.475, 0.475],
30+
['10px', 0, 0]
31+
),
32+
animationTimingFunction: cubicBezier(
33+
0.175,
34+
0.855,
35+
0.320,
36+
1
37+
),
38+
},
39+
};
40+
41+
export default zoomInLeft;

src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,4 @@ export rollOut from './components/rollOut';
9494
/* Zooming entrances */
9595
export zoomIn from './components/zoomIn';
9696
export zoomInDown from './components/zoomInDown';
97+
export zoomInLeft from './components/zoomInLeft';

0 commit comments

Comments
 (0)