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
Generic 'union' shown in prop table instead of Union<X | Y> [CRA + TS] #9896
Comments
I'm overhauling the props rendering and will try to get this working |
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! |
Any update with this? Latest install - any types that use a union are rendered as |
Having the same issue. It is pretty frustrating to work around. I'm having to put the union/options in the description, which makes for a cluttered and incosistent experience for the devs consuming our component library. |
You can fix this but it takes a decent amount of work. You basically need to add custom webpack config and add in the typescript info loader I forget exact name and not at computer right now |
https://github.com/strothj/react-docgen-typescript-loader I think that is it - if you look in issues I posted how I fixed it |
hipstersmoothie/storybook-addon-react-docgen#46 Never mind the info is here — even though this is a different add on - once I added the loader as I show in the issue the unions showed up for this add on as well |
This is used for docgen now right? https://www.npmjs.com/package/babel-plugin-react-docgen-typescript |
@taze-fullstack @bradennapier @Rune-KR @derek-k-watson Has this issue persisted with storybook 6.0? The configuration for typescript docgen is a bit smarter now. If this issue has persisted could you post a reproduction repo? |
Going to 6.0 fixed it for me!
Get Outlook for iOS
On Fri, Oct 23, 2020 at 1:38 PM -0500, "Andrew Lisowski" <notifications@github.com> wrote:
@taze-fullstack @bradennapier @Rune-KR @derek-k-watson Has this issue persisted with storybook 6.0? The configuration for typescript docgen is a bit smarter now. If this issue has persisted could you post a reproduction repo?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Awesome! I'm going to close this issue. If the issue persists for the rest feel free to open another issue with a reproduction repo and tag me in it. |
Describe the bug
Prop table shows generic
union
on props with declared union types. [This might be the intended behavior (?) so this might be a feature request instead of a bug]To Reproduce
Steps to reproduce the behavior:
Expected behavior
Prop table should say something like
Union<X | Y>
Screenshots
Code snippets
System:
The text was updated successfully, but these errors were encountered: