Skip to content

Commit

Permalink
Merge pull request #10463 from storybookjs/10462-docs-vue-inline-rend…
Browse files Browse the repository at this point in the history
…ering

Addon-docs: Inline stories in Vue by default
  • Loading branch information
shilman authored Apr 18, 2020
2 parents 8558152 + b4ef458 commit 0fd0f1f
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions addons/docs/src/frameworks/vue/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { extractComponentDescription } from '../../lib/docgen';

addParameters({
docs: {
inlineStories: true,
prepareForInline: (storyFn: StoryFn) => {
const Story = toReact(storyFn());
return <Story />;
Expand Down
2 changes: 1 addition & 1 deletion addons/docs/vue/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
1 change: 0 additions & 1 deletion examples/vue-kitchen-sink/.storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Vue.use(Vuex);

addParameters({
docs: {
inlineStories: true,
iframeHeight: '60px',
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ exports[`Storyshots Core/Parameters passed to story 1`] = `
<pre>
{
"docs": {
"inlineStories": true,
"iframeHeight": "60px"
},
"globalParameter": "globalParameter",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ exports[`Storyshots Custom/Decorator for Vue With Data 1`] = `
"story": "With Data",
"parameters": {
"docs": {
"inlineStories": true,
"iframeHeight": "60px"
},
"globalParameter": "globalParameter",
Expand Down

0 comments on commit 0fd0f1f

Please sign in to comment.