-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Vue: Add first-class args support #11115
Conversation
app/vue/src/client/preview/render.ts
Outdated
@@ -44,8 +44,10 @@ export default function render({ | |||
|
|||
showMain(); | |||
|
|||
// always refresh the component | |||
root[COMPONENT] = element; | |||
// at component creation || refresh by HMR // always refresh the component |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refresh by HMR OR changing story to be clear.
To me, that doesn't sound very intuitive. If we introduce "magic", it should be properly named, something like |
@graup thanks for the feedback and point taken. check out the new version, updated in the description. much better i think! |
Self-merging @backbone87 @tmeasday |
@shilman yeah this is better! 👍 |
The controls are working on the Canvas tab great now but don't seem to be having any effect in the Docs addon tab. https://next--storybookjs.netlify.app/vue-kitchen-sink/?path=/story/button--rounded |
@Martskin thanks for letting me know. Will look into it tomorrow! |
Glad to help! Thanks for the response. |
Release https://github.com/storybookjs/storybook/releases/tag/v6.0.0-beta.26 fixed it for me! Thanks. |
Issue: #11051
What I did
Worked with @backbone87 and @tmeasday to automatically inject args into the prop values, so you can do this:
This needs documentation but I'm not sure where is the best place for it currently.
How to test
See
vue-kitchen-sink
Feedback wanted, h/t @ndelangen for the idea of baking it into
@storybook/vue