Storybook: Addon-info not showing description and propTypes after adding react-css-modules

Created on 11 Apr 2018  路  8Comments  路  Source: storybookjs/storybook

If you are reporting a bug or requesting support, start here:

Bug summary

Hi,

I am facing a issue with storybook addon-info that after adding css modules the proptables are not showing the description and proptypes

Steps to reproduce

Component:

`import React from 'react';
import CSSModules from 'react-css-modules';
import styles from './button.css';

class Button extends AbstractComponent {
render() {
return (

info bug inactive

All 8 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!

Hi stale,

We still stuck with the same issue.

Please let me know if you need more info on this

You might need to extend your component using CSSModules before you export it and define the propTypes on top of that.

so instead of this:

export default CSSModules(Button,styles)`//your styles here`;

do something like:

const StyledButton = CSSModules(Button,styles)`//your styles here`;

StyledButton.propTypes = {
    value: PropTypes.string.isRequired
};

export default StyledButton;

same issue, extending component doesn't help

Also experiencing the same using @material-ui/core's withStyles decorator

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!

Also experiencing the same using @material-ui/core's withStyles decorator

me too, any news?

Was this page helpful?
0 / 5 - 0 ratings