UNPKG

@storybook/addon-docs

Version:

Document component usage and properties in Markdown

19 lines (17 loc) 451 B
import React from 'react'; export function prepareForInline(storyFn) { var html = storyFn(); if (typeof html === 'string') { // eslint-disable-next-line react/no-danger return /*#__PURE__*/React.createElement("div", { dangerouslySetInnerHTML: { __html: html } }); } return /*#__PURE__*/React.createElement("div", { ref: function ref(node) { return node ? node.appendChild(html) : null; } }); }