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

Commit dcd62ee

Browse files
author
Brandon Dail
committed
Add zoomOutRight animation
1 parent 1f6f8f8 commit dcd62ee

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

src/components/zoomOutRight.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// @flow
2+
import {
3+
compose,
4+
scale3d,
5+
scale,
6+
translate3d,
7+
} from '../utils';
8+
import type { Animation } from '../types';
9+
10+
const scale3dAndTranslate = compose(scale3d, translate3d);
11+
const scaleAndTranslate = compose(scale, translate3d);
12+
13+
const zoomOutRight: Animation = {
14+
'40%': {
15+
opacity: 1,
16+
transform: scale3dAndTranslate(
17+
[0.475, 0.475, 0.475],
18+
['-42px', 0, 0]
19+
),
20+
},
21+
to: {
22+
opacity: 0,
23+
transform: scaleAndTranslate(
24+
0.1,
25+
['2000px', 0, 0]
26+
),
27+
transformOrigin: 'right center',
28+
},
29+
};
30+
31+
export default zoomOutRight;

src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,4 @@ export zoomInUp from './components/zoomInUp';
102102
export zoomOut from './components/zoomOut';
103103
export zoomOutDown from './components/zoomOutDown';
104104
export zoomOutLeft from './components/zoomOutLeft';
105+
export zoomOutRight from './components/zoomOutRight';

0 commit comments

Comments
 (0)