diff --git a/dist/client/preview/render.js b/dist/client/preview/render.js index cdbc2067ad4d..f9810e187126 100644 --- a/dist/client/preview/render.js +++ b/dist/client/preview/render.js @@ -70,7 +70,12 @@ function renderMain(data, storyStore) { _reactDom2.default.unmountComponentAtNode(rootEl); } - return _reactDom2.default.render(story(), rootEl); + var context = { + kind: selectedKind, + story: selectedStory + }; + + return _reactDom2.default.render(story(context), rootEl); } function renderPreview(_ref) { diff --git a/src/client/preview/render.js b/src/client/preview/render.js index d2d92aa26d11..cb7fbc92ea84 100644 --- a/src/client/preview/render.js +++ b/src/client/preview/render.js @@ -42,7 +42,12 @@ export function renderMain(data, storyStore) { ReactDOM.unmountComponentAtNode(rootEl); } - return ReactDOM.render(story(), rootEl); + const context = { + kind: selectedKind, + story: selectedStory, + }; + + return ReactDOM.render(story(context), rootEl); } export default function renderPreview({ reduxStore, storyStore }) {