react-reveal
Version:
Really simple way to add reveal on scroll animation to your React app.
1 lines • 1.52 kB
JavaScript
function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _objectWithoutProperties(e,r){var o={};for(var t in e)r.indexOf(t)>=0||Object.prototype.hasOwnProperty.call(e,t)&&(o[t]=e[t]);return o}function make(){return name||(name=(0,_globals.animation)(rule))}function Swing(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_globals.defaults,r=e.children,o=(e.out,e.timeout),t=e.duration,n=void 0===t?_globals.defaults.duration:t,a=e.delay,u=void 0===a?_globals.defaults.delay:a,p=e.count,l=void 0===p?_globals.defaults.count:p,i=e.forever,d=_objectWithoutProperties(e,["children","out","timeout","duration","delay","count","forever"]),s={make:make,duration:void 0===o?n:o,delay:u,forever:i,count:l,style:{animationFillMode:"both"}};return(0,_wrap2.default)(d,s,!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 20% {\n transform: rotate3d(0, 0, 1, 15deg);\n }\n\n 40% {\n transform: rotate3d(0, 0, 1, -10deg);\n }\n\n 60% {\n transform: rotate3d(0, 0, 1, 5deg);\n }\n\n 80% {\n transform: rotate3d(0, 0, 1, -5deg);\n }\n\n to {\n transform: rotate3d(0, 0, 1, 0deg);\n}\n",name=!1;Swing.propTypes=propTypes,exports.default=Swing,module.exports=exports.default;
;