UNPKG

wix-style-react

Version:
35 lines (31 loc) 1.04 kB
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator"; import _regeneratorRuntime from "@babel/runtime/regenerator"; export var headingDriverFactory = function headingDriverFactory(component) { return { /** returns the component element */ element: function element() { return component; }, /** returns the component's text */ getText: function () { var _getText = _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 getText() { return _getText.apply(this, arguments); } return getText; }() }; }; export default headingDriverFactory;