UNPKG

react-reveal

Version:

Really simple way to add reveal on scroll animation to your React app.

1 lines 1.6 kB
"use strict";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 Tada(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_globals.defaults,r=e.children,o=(e.out,e.timeout),t=e.duration,a=void 0===t?_globals.defaults.duration:t,n=e.delay,u=void 0===n?_globals.defaults.delay:n,l=e.count,p=void 0===l?_globals.defaults.count:l,d=e.forever,s=_objectWithoutProperties(e,["children","out","timeout","duration","delay","count","forever"]),i={make:make,duration:void 0===o?a:o,delay:u,forever:d,count:p,style:{animationFillMode:"both"}};return(0,_wrap2.default)(s,i,!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 {\n transform: scale3d(1, 1, 1);\n }\n\n 10%, 20% {\n transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg);\n }\n\n 30%, 50%, 70%, 90% {\n transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);\n }\n\n 40%, 60%, 80% {\n transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);\n }\n\n to {\n transform: scale3d(1, 1, 1);\n}\n",name=!1;Tada.propTypes=propTypes,exports.default=Tada,module.exports=exports.default;