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

Commit 4e1d8ea

Browse files
author
Brandon Dail
committed
Add rollOut animation
1 parent 9e969da commit 4e1d8ea

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

src/components/rollOut.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// @flow
2+
import { compose, translate3d, rotate3d } from '../utils';
3+
import type { Animation } from '../types';
4+
5+
const translateAndRotate = compose(translate3d, rotate3d);
6+
7+
const rollOut: Animation = {
8+
from: {
9+
opacity: 1,
10+
},
11+
to: {
12+
opacity: 0,
13+
transform: translateAndRotate(
14+
['100%', 0, 0],
15+
[0, 0, 1, 120]
16+
),
17+
},
18+
};
19+
20+
export default rollOut;

src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,4 @@ export slideOutUp from './components/slideOutUp';
8989
/* Specials */
9090
export hinge from './components/hinge';
9191
export rollIn from './components/rollIn';
92+
export rollOut from './components/rollOut';

0 commit comments

Comments
 (0)