Skip to content

Commit 31467e0

Browse files
committed
merge conflict
2 parents a8bd665 + 054ba69 commit 31467e0

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.storybook/addons/codeEditorAddon/codeAddon.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ export const withCodeEditor = makeDecorator({
154154
}
155155
}
156156

157+
<<<<<<< HEAD
157158
}
158159

159160
const loadEditorContent = () => {
@@ -166,6 +167,10 @@ export const withCodeEditor = makeDecorator({
166167

167168
storyElement.addEventListener('load', () => {
168169
let doc = storyElement.contentDocument;
170+
=======
171+
editor.addEventListener('fileUpdated', () => {
172+
const storyElement = document.createElement('iframe');
173+
>>>>>>> release/latest
169174

170175
let { html, css, js } = editor.files;
171176
js = js.replace(
@@ -178,7 +183,8 @@ export const withCodeEditor = makeDecorator({
178183
<head>
179184
<script type="module" src="${mgtScriptName}"></script>
180185
<script type="module">
181-
${providerInitCode}
186+
import {Providers, MockProvider} from "${mgtScriptName}";
187+
Providers.globalProvider = new MockProvider(true);
182188
</script>
183189
<style>
184190
html, body {
@@ -201,6 +207,7 @@ export const withCodeEditor = makeDecorator({
201207
doc.close();
202208
});
203209

210+
<<<<<<< HEAD
204211
storyElement.className = 'story-mgt-preview';
205212
storyElementWrapper.innerHTML = '';
206213
storyElementWrapper.appendChild(storyElement);
@@ -209,6 +216,13 @@ export const withCodeEditor = makeDecorator({
209216
editor.addEventListener('fileUpdated', loadEditorContent);
210217

211218
const separator = document.createElement('div');
219+
=======
220+
storyElement.className = 'story-mgt-preview';
221+
storyElement.title = 'story-mgt-preview';
222+
storyElementWrapper.innerHTML = '';
223+
storyElementWrapper.appendChild(storyElement);
224+
});
225+
>>>>>>> release/latest
212226

213227
setupEditorResize(storyElementWrapper, separator, editor, () => editor.layout());
214228

0 commit comments

Comments
 (0)