react-reveal
Version:
Really simple way to add reveal on scroll animation to your React app.
1 lines • 1.7 kB
JavaScript
function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _objectWithoutProperties(e,r){var t={};for(var n in e)r.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function make(){return name||(name=(0,_globals.animation)(rule))}function Jump(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_globals.defaults,r=e.children,t=(e.out,e.timeout),n=e.duration,o=void 0===n?_globals.defaults.duration:n,a=e.delay,i=void 0===a?_globals.defaults.delay:a,u=e.count,p=void 0===u?_globals.defaults.count:u,l=e.forever,s=_objectWithoutProperties(e,["children","out","timeout","duration","delay","count","forever"]),d={make:make,duration:void 0===t?o:t,delay:i,forever:l,count:p,style:{animationFillMode:"both"}};return(0,_wrap2.default)(s,d,!1,r,!0)}Object.defineProperty(exports,"__esModule",{value:!0});var _propTypes=require("prop-types"),_wrap=require("./wrap"),_wrap2=_interopRequireDefault(_wrap),_globals=require("./globals"),propTypes={duration:_propTypes.number,timeout:_propTypes.number,delay:_propTypes.number,count:_propTypes.number,forever:_propTypes.bool},rule="\n from, 20%, 53%, 80%, to {\n animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);\n transform: translate3d(0,0,0);\n }\n\n 40%, 43% {\n animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);\n transform: translate3d(0, -30px, 0);\n }\n\n 70% {\n animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);\n transform: translate3d(0, -15px, 0);\n }\n\n 90% {\n transform: translate3d(0, -4px, 0);\n}\n",name=!1;Jump.propTypes=propTypes,exports.default=Jump,module.exports=exports.default;
;