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

PropsTable is not being rendered when my component is in an external package #253

Closed
itReverie opened this issue Aug 25, 2018 · 2 comments
Closed

Comments

@itReverie
Copy link

Bug Report

PropsTable are not being rendered if I use the Button.jsx file on a package (@itreverie/itr-components-basics) but if I use the same code in the Button.jsx file inside the docz project, the table renders correctly.

To Reproduce

  1. Clone the following repo to reproduce the issue.
    itr-components-lib
  2. Go to /itr-components-lib/src/basics/Button.mdx
  3. If you use import { Button } from '@itreverie/itr-components-basics'. It doesn't render the table but
  4. If you use import Button from './Button' It renders the table correctly.
    Note: The repo for the external components can be found in itr-components-basics, it is published in npm.

I would expect that if Button.jsx code is the same in my external package or in the file on my docz package the PropsTable should render. I do not understand why the table is not rendered when I use the Button.jsx on the external package.

propstabledocz

@nicholasess
Copy link
Contributor

@itReverie it isn’t a problem and yes a limition of lib that we use to render the prop-types. Then you need to use export default to work in docz.

@itReverie
Copy link
Author

Hello @nicholasess Thanks so much for your response. When you say I need to use "export default" what exactly do you mean. I think I am using export default Button; (as you can see in the image). I am sorry if I am not getting your point and it might be something basic, could you please be more specific?

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

No branches or pull requests

2 participants