-
Notifications
You must be signed in to change notification settings - Fork 17
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
Props in a story are not passed if they're named the same way as in the Vue component #23
Comments
Automention: Hey @Armanio @backbone87 @elevatebart @leoyli @pksunkara @pocka, you've been tagged! Can you give a hand here? |
Any chance you could set up a codepen, or a repo with a minimal reproduction of this behavior? |
I'm running into this right now – checking within the next days :) |
I've reproduced this here: https://github.com/HerrBertling/nuxt-ts-storybook-docs-issue –
EDIT: @tzhelyazkova I've added your case to the repo, it's also within the deployed storybook within the next minutes 😊 |
Turns out: If I actually use the correct setup for the controls/args stuff, it works as expected (=> HerrBertling/nuxt-ts-storybook-docs-issue@7dd04d8 ) – the knobs issue remains, though. I'll check that next since I'll most certainly run into this as well. |
@HerrBertling i'd recommend using controls/args instead of knobs |
That would definitely solve the problem and also solve this issue @tzhelyazkova – maybe it's a solution for you as well? You can see the correct usage here: https://github.com/HerrBertling/nuxt-ts-storybook-docs-issue/blob/main/components/MyButton/MyButton.stories.js |
I'm also experiencing this issue. I only see the behaviour occurring on the select knob - text, number, boolean and object are working fine for me. After a little investigation it looks to me like knobs and docs are conflicting with each other in some way, as either removing the |
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! |
Describe the bug
Naming a prop in a story the same way the component's prop is named leads to a broken state where the property value is not passed to the component.
Both the story and the vue component use TypeScript.
Workaround
Naming the prop in the story differently from the respective prop in the component works.
To Reproduce
template: '<Button :type="type" />'
Expected behavior
The prop value is passed to the component.
Code snippets
System:
I cannot think of anything wrong with either the Vue component or the story itself.
The text was updated successfully, but these errors were encountered: