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

Svelte component prop and description inference #12760

Closed
madeleineostoja opened this issue Oct 14, 2020 · 2 comments
Closed

Svelte component prop and description inference #12760

madeleineostoja opened this issue Oct 14, 2020 · 2 comments

Comments

@madeleineostoja
Copy link

Is your feature request related to a problem? Please describe
I couldn't find an issue tracking this, but there's currently no support for inferring props/arg and descriptions from Svelte components through the component field in CSF stories.

Describe the solution you'd like
Storybook should infer exported props and their types (if supplied with typescript) from Svelte components. I'm not sure how Storybook does its props inference, but I imagine it should be possible to parse .svelte components for their unique export let syntax for props.

Describe alternatives you've considered
It's possible to define your own props table with argTypes, but it's very cumbersome, especially when already using Typescript and JSDoc style comments in the actual component, to duplicate everything for storybook.

Are you able to assist to bring the feature to reality?
I don't think so, I have no idea how Storybook infers props currently. But I'd be happy to help however possible.

Additional context
N/A

@shilman
Copy link
Member

shilman commented Oct 15, 2020

@seaneking I believe that was added by @BlackFenix2 here and available in 6.1 alpha #12347

@shilman shilman added the PN label Oct 15, 2020
@madeleineostoja
Copy link
Author

Amazing! Thanks I'll try it out

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

No branches or pull requests

2 participants