-
-
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
Implement linkTo functionality #86
Conversation
Great work. 💯 I can see the point of passing an function. That's clever. |
It is possible to link storybook components by URL? I am asking because I have an idea of link them from a Styleguide, something like: |
@montogeek It'll be available by end of this week. |
@arunoda Marvelous! :D |
Update react-native to version 0.34.1 🚀
…20.0 @kadira/[email protected] untested⚠️
Add esbuild options for handling PNG files
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 1b07acc. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution
Sent with 💌 from NxCloud. |
As mentioned in #50 this implements
linkTo
.It uses the API suggested in the issue, with a couple of additions. The API is:
linkTo(kind: string|func, [story: string|func])
The initial suggestion was:
In addition to this, made the kind optional, so you can
linkTo('Toggle')
and it will link to the first story in that kind.Also, while building this functionality I found that there was a use case where the function being passed to the component should accept one or more arguments. That function should then decide where to go based on those arguments. For example, in the Todo Example:
In
onShow={action('onShow')}
, theaction()
is passed a constant describing the filter. There is no way to know what the filter will be, so we can't use a string. This is where you can use a function.