Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storybook not rendering ArgsTable for Modal #350

Open
Cleanshooter opened this issue Jul 2, 2021 · 1 comment
Open

Storybook not rendering ArgsTable for Modal #350

Cleanshooter opened this issue Jul 2, 2021 · 1 comment
Labels

Comments

@Cleanshooter
Copy link
Contributor

Describe the bug
Storybook not rendering ArgsTable for Modal

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://couds.github.io/react-bulma-components/iframe.html?id=components-modal--default&viewMode=docs#props
  2. See error "No inputs found for this component."

Expected behavior
The props for the modal component should be displayed.
(https://github.com/couds/react-bulma-components/blob/master/src/components/modal/modal.js)

Screenshots
image

Versions

  • react-bulma-components:: 4.0.7
  • bulma: 0.9.2
  • react: 17.0.2
  • Browser: Chrome 91

Additional context
While I was using this and the docs yesterday I noticed that the was a discrepancy between the props I saw in the code and the documentation in Storybook for the modal component. Long story short (and after about 8 hours trying to fix it yesterday) I couldn't find a way to get it to show up in story book.

Things I've tried (a.k.a. the long story):

  • Upgrading Storybook to 6.3.2 (did nothing)
  • Modifying the Meta tag to include the args in the modal.story.mdx file. (https://storybook.js.org/docs/riot/writing-docs/doc-blocks#mdx-1) (broke it, Modal didn't even show up in the story book anymore)
  • Customizing the modal.story.js to create a wrapper component for the modal with for it so I could manually add the args. (https://storybook.js.org/addons/storybook-addon-react-docgen) (also didn't work... I thinks its because storybook still can't digest the Modal props and this just modifies ones it matches.)
  • Manually creating the table (doesn't work so well since story book uses CSS Modules)

I'm wondering if anyone else has tried to fix this and what they've tried. At this point I'm stumped. The next thing I'd want to try is pretty drastic (redo the storybook config and use DocPages instead of MDX as a default) but I didn't think the repo maintainers would be onborad with such a drastic change.

The other thing I wondered is if we could somehow change the modal code so that storybook-addon-react-docgen would actually pick it up the props. I'm not exactly sure why it's not picking them up but I'm thinking it's related to one of the things mentioned in (FAQ - Nothing shows up, this is broken!) section on this page.

This is a great repo and I can tell you've put in a lot of work into this so far and I'd love to contribute but since I'm still fairly new to it I'm wondering if the primary maintainers have any ideas on this.

@Cleanshooter
Copy link
Contributor Author

Possibly related... the ArgsTable for the Column component is missing the gap prop. It's weird because it lists all the other props.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant