UNPKG

react-web-animation

Version:

react-web-animation is a set of React components that expose the Web Animations API in a declarative way.

41 lines (26 loc) 1.93 kB
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = require('react'); var _react2 = _interopRequireDefault(_react); var _effect = require('./effect'); var _effect2 = _interopRequireDefault(_effect); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* eslint no-unused-vars:0 */ /** * <AnimationGroup/> is a grouping element that uses the GroupEffect class provided by the Web Animations API polyfill. * Any <Animatable/> elements in a <AnimationGroup/> will be run in parallel, and <AnimationGroup/> will provide a single * timeline for the GroupEffect. */ var AnimationGroup = function (_Effect) { _inherits(AnimationGroup, _Effect); function AnimationGroup() { _classCallCheck(this, AnimationGroup); return _possibleConstructorReturn(this, (AnimationGroup.__proto__ || Object.getPrototypeOf(AnimationGroup)).call(this, 'GroupEffect')); } return AnimationGroup; }(_effect2.default); exports.default = AnimationGroup;