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