hipstersmoothie / storybook-addon-react-docgen

A storybook addon to display react docgen info.
MIT License
87 stars 14 forks source link

fix: switching between stories exception #105

Closed petermikitsh closed 4 years ago

petermikitsh commented 4 years ago

This PR fixes an exception that was being thrown when switching between stories. Temporarily, when switching from one story to the next, propData (which we expect to be an object) was getting set to the string that is the name of the story (e.g., button--emoji).

Thee unexpected type mismatch led to the runtime exception.

Also, added a new PropType to highlight the integration with pretty props. Here's how it looks now:

Screen Shot 2020-06-09 at 12 14 26 PM Screen Shot 2020-06-09 at 12 14 44 PM Screen Shot 2020-06-09 at 12 14 55 PM
📦 Published PR as canary version: 1.2.37-canary.105.1378.0
:sparkles: Test out this PR locally via: ```sh npm install storybook-addon-react-docgen@1.2.37-canary.105.1378.0 # or yarn add storybook-addon-react-docgen@1.2.37-canary.105.1378.0 ```