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

Commit 97a1d2c

Browse files
author
Brandon Dail
committed
Add zoomInDown animation
1 parent b17e77f commit 97a1d2c

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

src/components/zoomInDown.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 zoomInDown: Animation = {
13+
from: {
14+
opacity: 0,
15+
transform: scaleAndTranslate(
16+
[0.1, 0.1, 0.1],
17+
[0, '-1000px', 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+
[0, '60px', 0]
31+
),
32+
animationTimingFunction: cubicBezier(
33+
0.175,
34+
0.855,
35+
0.320,
36+
1
37+
),
38+
},
39+
};
40+
41+
export default zoomInDown;

src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,4 @@ export rollOut from './components/rollOut';
9393

9494
/* Zooming entrances */
9595
export zoomIn from './components/zoomIn';
96+
export zoomInDown from './components/zoomInDown';

0 commit comments

Comments
 (0)