react-awesome-reveal
Advanced tools
Comparing version
@@ -612,5 +612,2 @@ "use strict"; | ||
var import_jsx_runtime = require("@emotion/react/jsx-runtime"); | ||
function hideWhen(condition) { | ||
return matchIfOrNull(() => ({ opacity: 0 }))(condition); | ||
} | ||
var Reveal = (props) => { | ||
@@ -675,9 +672,5 @@ const { | ||
css: matchIfOrNull(() => animationStyles)(inView), | ||
style: Object.assign( | ||
{}, | ||
childStyle, | ||
node.props.style, | ||
hideWhen(!inView), | ||
{ animationDelay: nodeDelay + "ms" } | ||
) | ||
style: Object.assign({}, childStyle, node.props.style, { | ||
animationDelay: nodeDelay + "ms" | ||
}) | ||
} | ||
@@ -756,5 +749,5 @@ ) }) | ||
css: matchIfOrNull(() => animationStyles)(inView), | ||
style: Object.assign({}, hideWhen(!inView), { | ||
style: { | ||
animationDelay: delay + index * duration * damping + "ms" | ||
}), | ||
}, | ||
children: char | ||
@@ -790,3 +783,3 @@ }, | ||
css: matchIfOrNull(() => animationStyles)(inView), | ||
style: Object.assign({}, style, hideWhen(!inView)), | ||
style, | ||
children | ||
@@ -793,0 +786,0 @@ } |
{ | ||
"name": "react-awesome-reveal", | ||
"description": "React components to add reveal animations using the Intersection Observer API and CSS Animations.", | ||
"version": "4.2.2", | ||
"version": "4.2.3", | ||
"license": "MIT", | ||
@@ -56,2 +56,5 @@ "source": "src/index.ts", | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"peerDependencies": { | ||
@@ -58,0 +61,0 @@ "@emotion/react": "^11.0.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
288304
-0.54%3784
-0.37%