-
Notifications
You must be signed in to change notification settings - Fork 257
Description
Hi! Thanks very much for react-docgen-styleguidist. We're making good progress on creating a living style guide for our in-house documents thanks to it!
One blocking issue, however, is the impact on styleguidist when react-docgen-typescript can't parse the props in one component: it fails catastrophically with the dreaded TypeError: Cannot read property 'methods' of null
error, and prevents the entire styleguide from being generated.
Our workaround right now is to remove that component from the styleguide, but it would be really helpful to be able to have a component in the styleguide even if react-docgen-styleguidist can't figure out props for it, so we can provide examples and live views of the component.
Here's an example of one of our problematic components, where we're using glamorous to produce a simple low-level styled component:
import glamorous from 'glamorous';
import { ITheme } from './ITheme';
export const BodyText = glamorous.span({
}, (_props: any, theme: ITheme) => ({
color: theme.bodyTextColor,
fontSize: theme.bodyTextSize
}));
export default BodyText;
It would be unreasonable to expect react-docgen-stypescript to figure out the props for that, but it would be great if it could still advertise a BodyText
component with enough data to prevent styleguidist from blowing up, allowing a BodyText.md file to be created with examples.
Thanks!