-
-
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
Addon-contexts: Improve Vue integration #6632
Conversation
This pull request is automatically deployed with Now. Latest deployment for this branch: https://monorepo-git-add-addon-contextsvue-i.storybook.now.sh |
Uh... sorry I forget to commit the snapshot files, a commit is coming up 💪 |
@shilman... it seems some linting errors from files other than the scope of this PR?! Is any quick fix or I just ignore it?! |
`, | ||
}, | ||
}; | ||
}; |
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.
I think the createContext
in React is really well-designed, so I'm also thinking to make this util component a standalone package or as a helper in the addon. I have google and look into NPM registry, few examples or ideal implementation (vue2.6 changed something so they seems a bit outdated)...
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.
I have published the latest implementation for this util component: vue-create-context with some minor improvements. But I think we can just merge this PR since it is not super long and working well (or maybe just copy past the latest source code from my repo)?!
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.
Awesome!! 🚀
Issue: #6631
What I did
How to test
Live example:
https://monorepo-git-add-addon-contextsvue-i.storybook.now.sh/examples/vue-kitchen-sink/?path=/story/addon-contexts--languages&contexts=Languages=French,CSS%20Themes=Desert