From 18d5aab987cd4e54c6d0272c00ca3b086d9ba731 Mon Sep 17 00:00:00 2001 From: Muhammed Thanish Date: Tue, 14 Jun 2016 13:46:36 +0530 Subject: [PATCH] Pass selected kind and story as args --- dist/client/preview/render.js | 7 ++++++- src/client/preview/render.js | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/dist/client/preview/render.js b/dist/client/preview/render.js index cdbc2067ad4..f9810e18712 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 d2d92aa26d1..cb7fbc92ea8 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 }) {