Storybook: Displaying docs inside the storybook

Created on 26 Apr 2016  ·  3Comments  ·  Source: storybookjs/storybook

At the moment the only way to display docs is the use of:

storiesOf('Main story', module)
  .add('some configuation, () => (
    <SomeComponent />
  )).(...)

This is insufficient for most our components...

In our use case it would be nice if we:

  1. could add some more description (like an optional description tag for the story)
storiesOf('Main story', module, 'This component can be used to ... and has the following params ...')
  .add('some configuation, () => (
    <SomeComponent />
  )).(...)
  1. or even better somehow reads the jsdocs in the js files and displays them above the component examples:
/**
 * Represents a book.
 * @constructor
 * @param {string} title - The title of the book.
 * @param {string} author - The author of the book.
 */

I think this is somehow related to #56 but not quite the same.

Regards,
Lukas

feature request

Most helpful comment

I'd prefer a .md file in the component folder, rendered below or beside.

All 3 comments

Yeah. This is great.
If we need the file system manually, that'll be bit harder and over complicated.
But, I think pushing this with the story makes sense.

We are also looking something for this with notes. Basically, with that we have another Tab on the bottom called "Notes".

I'd prefer a .md file in the component folder, rendered below or beside.

Fixed with this addon

Was this page helpful?
0 / 5 - 0 ratings

Related issues

EdenTurgeman picture EdenTurgeman  ·  81Comments

moimikey picture moimikey  ·  67Comments

ilias-t picture ilias-t  ·  73Comments

p3k picture p3k  ·  61Comments

bpeab picture bpeab  ·  70Comments