Can you give decorators, parameters and hooks to Templates? #14982
Unanswered
TonyHoanTrinh
asked this question in
Help
Replies: 2 comments 1 reply
-
I answer question about hooks.
|
Beta Was this translation helpful? Give feedback.
1 reply
-
After some experimenting, it seems Templates cannot have decorators and parameters be inherited by stories that bind to templates. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to use a Template to reuse code for making some stories.
Here I have a Template called Template and want to create two stories called Default and Checked.
I know that we can have decorators and parameters on each of the stories
But if I had decorators and parameters on the template and then use bind for my Default and Checked stories, will the decorators and parameters applied on the template work on the Default and Checked stories?????
I also want to ask, how do I use hooks with my templates?
I want to be able to do something like this, but it doesn't work sadly and crashes my storybook. I want the Default and Checked stories to use the variable checker and the setIsChecked hook.
Thank you so much!
Beta Was this translation helpful? Give feedback.
All reactions