1 | /* eslint-disable import/no-extraneous-dependencies */
|
2 | import React from 'react';
|
3 | import HOC from '@storybook/svelte/templates/HOC.svelte';
|
4 | export var prepareForInline = function prepareForInline(storyFn) {
|
5 | var el = React.useRef(null);
|
6 | React.useEffect(function () {
|
7 | var root = new HOC({
|
8 | target: el.current,
|
9 | props: {
|
10 | storyFn: storyFn
|
11 | }
|
12 | });
|
13 | return function () {
|
14 | return root.$destroy();
|
15 | };
|
16 | });
|
17 | return /*#__PURE__*/React.createElement('div', {
|
18 | ref: el
|
19 | });
|
20 | }; |
\ | No newline at end of file |