renderJsx = function renderJsx(code, options) {
  if (typeof code === 'undefined') {
    _storybook_client_logger__WEBPACK_IMPORTED_MODULE_28__.logger.warn('Too many skip or undefined component');
    return null;
  }

  var renderedJSX = code;
  var Type = renderedJSX.type;

  for (var i = 0; i < options.skip; i += 1) {
    if (typeof renderedJSX === 'undefined') {
      _storybook_client_logger__WEBPACK_IMPORTED_MODULE_28__.logger.warn('Cannot skip undefined element');
      return null;
    }

    if (react__WEBPACK_IMPORTED_MODULE_21___default().Children.count(renderedJSX) > 1) {
      _storybook_client_logger__WEBPACK_IMPORTED_MODULE_28__.logger.warn('Trying to skip an array of elements');
      return null;
    }

    if (typeof renderedJSX.props.children === 'undefined') {
      _storybook_client_logger__WEBPACK_IMPORTED_MODULE_28__.logger.warn('Not enough children to skip elements.');

      if (typeof renderedJSX.type === 'function' && renderedJSX.type.name === '') {
        renderedJSX = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_21___default().createElement(Type, renderedJSX.props);
      }
    } else if (typeof renderedJSX.props.children === 'function') {
      renderedJSX = renderedJSX.props.children();
    } else {
      renderedJSX = renderedJSX.props.children;
    }
  }

  var displayNameDefaults = typeof options.displayName === 'string' ? {
    showFunctions: true,
    displayName: function displayName() {
      return options.displayName;
    }
  } : {
    // To get exotic component names resolving properly
    displayName: function displayName(el) {
      return el.type.displayName || (0,_lib_docgen__WEBPACK_IMPORTED_MODULE_25__.getDocgenSection)(el.type, 'displayName') || (el.type.name !== '_default' ? el.type.name : null) || (typeof el.type === 'function' ? 'No Display Name' : null) || ((0,_lib__WEBPACK_IMPORTED_MODULE_26__.isForwardRef)(el.type) ? el.type.render.name : null) || ((0,_lib__WEBPACK_IMPORTED_MODULE_26__.isMemo)(el.type) ? el.type.type.name : null) || el.type;
    }
  };
  var filterDefaults = {
    filterProps: function filterProps(value, key) {
      return value !== undefined;
    }
  };
  var opts = Object.assign({}, displayNameDefaults, filterDefaults, options);
  var result = react__WEBPACK_IMPORTED_MODULE_21___default().Children.map(code, function (c) {
    // @ts-ignore FIXME: workaround react-element-to-jsx-string
    var child = typeof c === 'number' ? c.toString() : c;
    var string = applyBeforeRender((0,react_element_to_jsx_string__WEBPACK_IMPORTED_MODULE_22__["default"])(child, opts), options);

    if (string.indexOf('&quot;') > -1) {
      var matches = string.match(/\S+=\\"([^"]*)\\"/g);

      if (matches) {
        matches.forEach(function (match) {
          string = string.replace(match, match.replace(/&quot;/g, "'"));
        });
      }
    }

    return string;
  }).join('\n');
  return result.replace(/function\s+noRefCheck\(\)\s+\{\}/, '() => {}');
}
Apply the users parameters and render the jsx for a story