From daa22d33fdc2f793df17a796bced62183d1e9258 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9on=20Rodenburg?= Date: Fri, 3 Nov 2017 15:24:57 +0100 Subject: [PATCH] Notes addon for Polymer --- examples/polymer-cli/.storybook/addons.js | 3 ++- examples/polymer-cli/package.json | 1 + examples/polymer-cli/src/stories/index.js | 9 ++++++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/examples/polymer-cli/.storybook/addons.js b/examples/polymer-cli/.storybook/addons.js index 1652fa97dd3..7ae1b53a32f 100644 --- a/examples/polymer-cli/.storybook/addons.js +++ b/examples/polymer-cli/.storybook/addons.js @@ -1 +1,2 @@ -import '@storybook/addon-actions/register'; \ No newline at end of file +import '@storybook/addon-actions/register'; +import '@storybook/addon-notes/register'; diff --git a/examples/polymer-cli/package.json b/examples/polymer-cli/package.json index f5c76b6b511..0828dfc8074 100644 --- a/examples/polymer-cli/package.json +++ b/examples/polymer-cli/package.json @@ -8,6 +8,7 @@ "dependencies": { "@polymer/polymer": "^2.2.0", "@storybook/addon-actions": "file:../../addons/actions", + "@storybook/addon-notes": "file:../../addons/notes", "@storybook/polymer": "file:../../app/polymer", "@webcomponents/webcomponentsjs": "^1.0.17", "global": "^4.3.2", diff --git a/examples/polymer-cli/src/stories/index.js b/examples/polymer-cli/src/stories/index.js index ff129da3bdc..facdeb1af3a 100644 --- a/examples/polymer-cli/src/stories/index.js +++ b/examples/polymer-cli/src/stories/index.js @@ -1,5 +1,6 @@ import { storiesOf } from '@storybook/polymer'; import { action } from '@storybook/addon-actions'; +import { withNotes } from '@storybook/addon-notes'; import { document } from 'global'; import '../playground-button.html'; import './storybook-welcome-to-polymer.html'; @@ -15,4 +16,10 @@ storiesOf('', module) const el = document.createElement('playground-button'); el.addEventListener('click', action('Button clicked')); return el; - }); + }) + .add( + 'with notes', + withNotes('We have the best playground buttons, ever.')( + () => '' + ) + );