Storybook: addon-info not working properly

Created on 26 Jul 2019  路  4Comments  路  Source: storybookjs/storybook

Describe the bug
Followed the readme to add addon-info to my storybook but the info created is wrong.
In my story source, instead of showing the JSX I have provided to the story, the following is shown:

<ReactDecorator story={<Tiles />} onMount={anonymous} onUnMount={anonymous} />

I am using typescript so I know PropTypes won't work out of the box and needs to be configured but the story source should render fine.

To Reproduce
Steps to reproduce the behavior:

  1. Followed readme to install addon-info
  2. Added it to config file
  3. Passed info parameter to my story
  4. Source story not as expected
  5. Then added withInfo as 1st decorator on my story
  6. No change in Source Story

Expected behavior
My Story Source should be render instead of <ReactDecorator ... />

Screenshots
CaptureIssue

Code snippets

storiesOf('RibbonBox', module)
    .addDecorator(withInfo)
    .addDecorator(withKnobs)
    .add('Default', () => (
        <Tiles>
          <Tiles.Card>
            <Tiles.Details iconSize="2x" iconName="id-badge" text="Lorem Ipsum" />
          </Tiles.Card>
          <Tiles.Card>
            <Tiles.Details iconSize="2x" iconName="cog" text="Dolor Sit Amet" />
          </Tiles.Card>
        </Tiles>
    ), {
        info: { text: 'Description' }
    }
})

System:

Environment Info:

  System:
    OS: Windows 7
    CPU: (4) x64 Intel(R) Core(TM) i5-4210M CPU @ 2.60GHz
  Binaries:
    Node: 10.15.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.15.2 - C:\Users\rahulpsd18\AppData\Roaming\npm\yarn.CMD
    npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD

Additional context
Regrading PropTypes: I followed the issue #1519 and integrated react-docgen-typescript-loader to add Prop Types automatically from my Typescript interfaces but no changes were seen in the storybook. It still showed the props: story, onMount and onUnMount as seen in the screenshot attached.

info inactive question / support

Most helpful comment

FYI addon-info聽is being superceded by聽addon-docs, which fixes a bunch of bugs and is easier to maintain. It鈥檚 reached release candidate (RC) status and will be properly released soon. Please give it a try!聽https://medium.com/storybookjs/storybook-docspage-e185bc3622bf

All 4 comments

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

FYI addon-info聽is being superceded by聽addon-docs, which fixes a bunch of bugs and is easier to maintain. It鈥檚 reached release candidate (RC) status and will be properly released soon. Please give it a try!聽https://medium.com/storybookjs/storybook-docspage-e185bc3622bf

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!

Was this page helpful?
0 / 5 - 0 ratings