From 8fd983f6645a07cdbcb47d26b8cbceb80b841dac Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Sat, 18 Apr 2020 07:51:07 +0800 Subject: [PATCH 1/2] Addon-docs: Inline stories in Vue by default --- addons/docs/src/frameworks/vue/config.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/docs/src/frameworks/vue/config.tsx b/addons/docs/src/frameworks/vue/config.tsx index fc141075443f..bcc247887118 100644 --- a/addons/docs/src/frameworks/vue/config.tsx +++ b/addons/docs/src/frameworks/vue/config.tsx @@ -7,6 +7,7 @@ import { extractComponentDescription } from '../../lib/docgen'; addParameters({ docs: { + inlineStories: true, prepareForInline: (storyFn: StoryFn) => { const Story = toReact(storyFn()); return ; From b4ef458618aeedb828de37c67cb60b569e51adff Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Sat, 18 Apr 2020 07:55:01 +0800 Subject: [PATCH 2/2] Addon-docs: Vue inline stories documentation & example --- addons/docs/vue/README.md | 2 +- examples/vue-kitchen-sink/.storybook/preview.js | 1 - .../src/stories/__snapshots__/core.stories.storyshot | 1 - .../stories/__snapshots__/custom-decorators.stories.storyshot | 1 - 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/addons/docs/vue/README.md b/addons/docs/vue/README.md index 27fe8e060e60..1733036619bc 100644 --- a/addons/docs/vue/README.md +++ b/addons/docs/vue/README.md @@ -133,7 +133,7 @@ Yes, it's redundant to declare `component` twice. [Coming soon](https://github.c Storybook Docs renders all Vue stories inside IFrames, with a default height of `60px` (configurable using the `docs.iframeHeight` story parameter). -Starting in 5.3, you can also render stories inline, and in 6.0 this will become the default behavior. To render inline, update `.storybook/preview.js`: +Starting in 5.3, you can also render stories inline, and in 6.0 this has become the default behavior. To render inline, update `.storybook/preview.js`: ```js import { addParameters } from '@storybook/vue'; diff --git a/examples/vue-kitchen-sink/.storybook/preview.js b/examples/vue-kitchen-sink/.storybook/preview.js index 463518864b20..bbc8604d3ed3 100644 --- a/examples/vue-kitchen-sink/.storybook/preview.js +++ b/examples/vue-kitchen-sink/.storybook/preview.js @@ -9,7 +9,6 @@ Vue.use(Vuex); addParameters({ docs: { - inlineStories: true, iframeHeight: '60px', }, }); diff --git a/examples/vue-kitchen-sink/src/stories/__snapshots__/core.stories.storyshot b/examples/vue-kitchen-sink/src/stories/__snapshots__/core.stories.storyshot index 399cf8f5f90b..c14deee78a0b 100644 --- a/examples/vue-kitchen-sink/src/stories/__snapshots__/core.stories.storyshot +++ b/examples/vue-kitchen-sink/src/stories/__snapshots__/core.stories.storyshot @@ -6,7 +6,6 @@ exports[`Storyshots Core/Parameters passed to story 1`] = `
     {
   "docs": {
-    "inlineStories": true,
     "iframeHeight": "60px"
   },
   "globalParameter": "globalParameter",
diff --git a/examples/vue-kitchen-sink/src/stories/__snapshots__/custom-decorators.stories.storyshot b/examples/vue-kitchen-sink/src/stories/__snapshots__/custom-decorators.stories.storyshot
index df9bacb86f4e..6c0dee746349 100644
--- a/examples/vue-kitchen-sink/src/stories/__snapshots__/custom-decorators.stories.storyshot
+++ b/examples/vue-kitchen-sink/src/stories/__snapshots__/custom-decorators.stories.storyshot
@@ -49,7 +49,6 @@ exports[`Storyshots Custom/Decorator for Vue With Data 1`] = `
   "story": "With Data",
   "parameters": {
     "docs": {
-      "inlineStories": true,
       "iframeHeight": "60px"
     },
     "globalParameter": "globalParameter",