Skip to content

Commit

Permalink
Merge pull request #3309 from paul42/master
Browse files Browse the repository at this point in the history
Update Docs to use new Notes form and use yarn for addon install
  • Loading branch information
Hypnosphi committed Mar 30, 2018
1 parent 79675fd commit 3a0adf2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion addons/notes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Storybook Addon Notes allows you to write notes (text or HTML) for your stories
### Getting Started

```sh
npm i --save-dev @storybook/addon-notes
yarn add -D @storybook/addon-notes
```

Then create a file called `addons.js` in your storybook config.
Expand Down
6 changes: 2 additions & 4 deletions docs/src/pages/addons/using-addons/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ We are going to use an addon called [Notes](https://github.com/storybooks/storyb
First, we need to install the addons:

```sh
npm i --save-dev @storybook/addons @storybook/addon-actions @storybook/addon-links @storybook/addon-notes
yarn add -D @storybook/addons @storybook/addon-actions @storybook/addon-links @storybook/addon-notes
```

Then, we need to create a file called `addons.js` inside the storybook config directory and add the following content:
Expand All @@ -38,9 +38,7 @@ import Button from './Button';

storiesOf('Button', module)
.add('with some emoji', () => (
<WithNotes notes={'Here we use some emoji as the Button text. Doesn&apos;t it look nice?'}>
<Button onClick={action('clicked')}><span role="img" aria-label="so cool">😀 😎 👍 💯</span></Button>
</WithNotes>
withNotes('A very simple component')(() => <Button onClick={action('clicked')}><span role="img" aria-label="so cool">😀 😎 👍 💯</span></Button>));
));
```

Expand Down

0 comments on commit 3a0adf2

Please sign in to comment.