Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addon-docs: Inline stories in Vue by default #10463

Merged
merged 2 commits into from
Apr 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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