Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Commit

Permalink
Add storybook docs addon
Browse files Browse the repository at this point in the history
Renaming the story files is necessary to conform with internal regex for
selecting files from which the story is extracted[1][2].

[1]: storybookjs/storybook#8104 (comment)
[2]: https://github.com/storybookjs/storybook/blob/next/addons/docs/docs/docspage.md#story-file-names

Overwriting `extractComponentDescription` seems to be the only way to
add back a description into the stories file itself that does not live
in the component.

Change-Id: Ia50d560ad5215e089db938dcfc060f740419118a
  • Loading branch information
micgro42 committed Jan 14, 2020
1 parent a38581d commit 57d08d6
Show file tree
Hide file tree
Showing 7 changed files with 2,552 additions and 115 deletions.
1 change: 1 addition & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ module.exports = {
stories: [ '../stories/*.js' ],
addons: [
'@storybook/addon-a11y',
'@storybook/addon-docs',
],
};
8 changes: 7 additions & 1 deletion .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { addDecorator } from '@storybook/vue';
import { addDecorator, addParameters } from '@storybook/vue';
import { withA11y } from '@storybook/addon-a11y';
import './storybook-global.scss';

addDecorator( withA11y );

addParameters( {
docs: {
inlineStories: true,
},
} );
Loading

0 comments on commit 57d08d6

Please sign in to comment.