Skip to content

Commit d1bcf73

Browse files
committed
allow array as first class arg for Keyframes.[Primitive](arg) pmndrs#160
1 parent 081d632 commit d1bcf73

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Keyframes.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ class Keyframes extends React.PureComponent {
7878
}
7979

8080
static create = primitive => states => {
81-
if (typeof states === 'function') states = { [DEFAULT]: states }
81+
if (typeof states === 'function' || Array.isArray(states))
82+
states = { [DEFAULT]: states }
8283
return props => (
8384
<Keyframes primitive={primitive} states={states} {...props} />
8485
)

0 commit comments

Comments
 (0)