pocotan001 / react-styleguide-generator

Easily generate a good-looking styleguide by adding some documentation to your React project.
http://pocotan001.github.io/react-styleguide-generator
MIT License
700 stars 76 forks source link

Fix error on default props but no propTypes #6

Closed theogravity closed 9 years ago

theogravity commented 9 years ago

This fixes a bug where the styleguide does not display when you have a default prop defined but no proptypes:

propTypes: {
    someValue: 1
}

getDefaultProps() {
    return {
        someValue: 0
        someOtherValue: 1
    }
}

In the above case, someOtherValue would cause the guide to break because it is not in the propTypes. I have situations where I want to do this.

pocotan001 commented 9 years ago

Thanks @theogravity !

theogravity commented 9 years ago

Thanks! May I ask when a new version will be published with the changes?