We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61b60dc commit 080c0b5Copy full SHA for 080c0b5
src/Animate/Utils.js
@@ -0,0 +1 @@
1
+export const isArray = (obj) => new Array(obj).isArray;
src/Animate/index.js
@@ -1,8 +1,19 @@
import React from 'react';
2
+import * as Utils from './Utils';
3
4
class Animate extends PureComponent {
5
render() {
- return null;
6
+ const { Animation } = this.props;
7
+
8
+ if (Utils.isArray(Animation)) {
9
+ return 'multiple animations';
10
+ }
11
12
+ return (
13
+ <Animation {...this.props}>
14
+ {this.props.children}
15
+ </Animation>
16
+ );
17
}
18
19
0 commit comments