react-simple-animate
Advanced tools
Comparing version 3.0.2 to 3.0.3
@@ -159,8 +159,9 @@ import * as React from 'react'; | ||
function AnimateKeyframes(props) { | ||
const { children, play, render, duration = 0.3, delay = 0, easeType = 'linear', playState = 'running', direction = 'normal', fillMode = 'none', iterationCount = 1, keyframes, } = props; | ||
const { children, play, render, duration = 0.3, delay = 0, easeType = 'linear', playState = 'running', direction = 'normal', fillMode = 'none', iterationCount = 1, sequenceIndex, keyframes, sequenceId, } = props; | ||
const animationNameRef = useRef$2(''); | ||
const id = getSequenceId(sequenceIndex, sequenceId); | ||
const styleTagRef = useRef$2({ | ||
sheet: {}, | ||
}); | ||
const { register } = useContext$1(AnimateContext); | ||
const { register, animationStates = {} } = useContext$1(AnimateContext); | ||
const forceUpdate = useState$2(false)[1]; | ||
@@ -179,3 +180,3 @@ useEffect$2(() => { | ||
}, []); | ||
const style = play | ||
const style = (animationStates[id] || {}).play || play | ||
? { | ||
@@ -182,0 +183,0 @@ animation: `${duration}s ${easeType} ${delay}s ${iterationCount} ${direction} ${fillMode} ${playState} ${animationNameRef.current || |
@@ -162,8 +162,9 @@ 'use strict'; | ||
function AnimateKeyframes(props) { | ||
const { children, play, render, duration = 0.3, delay = 0, easeType = 'linear', playState = 'running', direction = 'normal', fillMode = 'none', iterationCount = 1, keyframes, } = props; | ||
const { children, play, render, duration = 0.3, delay = 0, easeType = 'linear', playState = 'running', direction = 'normal', fillMode = 'none', iterationCount = 1, sequenceIndex, keyframes, sequenceId, } = props; | ||
const animationNameRef = useRef$2(''); | ||
const id = getSequenceId(sequenceIndex, sequenceId); | ||
const styleTagRef = useRef$2({ | ||
sheet: {}, | ||
}); | ||
const { register } = useContext$1(AnimateContext); | ||
const { register, animationStates = {} } = useContext$1(AnimateContext); | ||
const forceUpdate = useState$2(false)[1]; | ||
@@ -182,3 +183,3 @@ useEffect$2(() => { | ||
}, []); | ||
const style = play | ||
const style = (animationStates[id] || {}).play || play | ||
? { | ||
@@ -185,0 +186,0 @@ animation: `${duration}s ${easeType} ${delay}s ${iterationCount} ${direction} ${fillMode} ${playState} ${animationNameRef.current || |
{ | ||
"name": "react-simple-animate", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"description": "react simple animate", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
249247
267
711