Skip to content

Commit

Permalink
Add storybook notes addon
Browse files Browse the repository at this point in the history
  • Loading branch information
psychobolt committed Aug 8, 2018
1 parent b25e889 commit cf5d4fb
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions .storybook/addons.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@storybook/addon-actions/register';
import '@storybook/addon-links/register';
import '@storybook/addon-notes/register';
import 'storybook-readme/register';
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"@storybook/addon-actions": "^3.4.8",
"@storybook/addon-console": "^1.0.4",
"@storybook/addon-links": "^3.4.8",
"@storybook/addon-notes": "^3.4.10",
"@storybook/react": "^3.4.8",
"babel-core": "^6.26.3",
"babel-eslint": "8.2.6",
Expand Down
6 changes: 5 additions & 1 deletion src/HelloWorld/HelloWorld.stories.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import { storiesOf } from '@storybook/react';
import { withNotes } from '@storybook/addon-notes';

import App from 'stories/App';
import index, { HelloWorld } from 'dist';
Expand All @@ -10,4 +11,7 @@ storiesOf('HelloWorld', module)
<HelloWorld />
</App>
))
.add('default import', index());
.add('default import', withNotes('Default import that only logs into console')(() => {
index();
return <div />;
}));
11 changes: 10 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,15 @@
global "^4.3.2"
prop-types "^15.6.1"

"@storybook/addon-notes@^3.4.10":
version "3.4.10"
resolved "https://registry.yarnpkg.com/@storybook/addon-notes/-/addon-notes-3.4.10.tgz#af3fb5e1e217a92602a0314d0615697b5abdbc9d"
dependencies:
babel-runtime "^6.26.0"
marked "^0.3.17"
prop-types "^15.6.1"
util-deprecate "^1.0.2"

"@storybook/[email protected]":
version "3.4.8"
resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-3.4.8.tgz#ff1142d8f0963dd28b7c6f88dc9d3be170ac6600"
Expand Down Expand Up @@ -6041,7 +6050,7 @@ markdown-table@^1.1.0:
version "1.1.2"
resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-1.1.2.tgz#c78db948fa879903a41bce522e3b96f801c63786"

marked@^0.3.9:
marked@^0.3.17, marked@^0.3.9:
version "0.3.19"
resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.19.tgz#5d47f709c4c9fc3c216b6d46127280f40b39d790"

Expand Down

0 comments on commit cf5d4fb

Please sign in to comment.