UNPKG

wix-style-react

Version:
39 lines (33 loc) 1.12 kB
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator"; import _regeneratorRuntime from "@babel/runtime/regenerator"; var carouselDriverFactory = function carouselDriverFactory(component) { return { element: function element() { return component; }, isReady: function () { var _isReady = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() { return _regeneratorRuntime.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: _context.next = 2; return component.getAttribute('data-ready'); case 2: _context.t0 = _context.sent; return _context.abrupt("return", _context.t0 === 'true'); case 4: case "end": return _context.stop(); } } }, _callee); })); function isReady() { return _isReady.apply(this, arguments); } return isReady; }() }; }; export default carouselDriverFactory;