UNPKG

wix-style-react

Version:
37 lines (31 loc) 1.01 kB
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator"; import _regeneratorRuntime from "@babel/runtime/regenerator"; var badgeDriverFactory = function badgeDriverFactory(component) { return { /** returns the component element */ element: function element() { return component; }, /** returns the component text */ text: function () { var _text = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() { return _regeneratorRuntime.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: return _context.abrupt("return", component.getText()); case 1: case "end": return _context.stop(); } } }, _callee); })); function text() { return _text.apply(this, arguments); } return text; }() }; }; export default badgeDriverFactory;