storybookjs / storybook

Storybook is a frontend workshop for building UI components and pages in isolation. Made for UI development, testing, and documentation.
https://storybook.js.org
MIT License
83.37k stars 9.11k forks source link

addon-info: Props while using JSS injectSheet #3195

Closed raed667 closed 6 years ago

raed667 commented 6 years ago

Issue details

I have a styled component 'TaskDetail' in which I use React's CSSinJS and basically export it wrapped in a stylesheet:

1- When I try to use the addon-info plugin without the style sheet, it works as expected:

without-stylesheet

2- When I try to inject the style sheet before exposing my component, I lose all info since the component being exporting is actually the JSS wrapper.

export default injectSheet(styles)(TaskDetail);

with-stylesheet

Steps to reproduce

Export a styled component.

Please specify which version of Storybook and optionally any affected addons that you're running

raed667 commented 6 years ago

Found that this is a dupe of #1735