re-use knobs
#389
-
It seems one can not predefine knobs and re-use them in stories. const fields = array("...")
storiesOf("Button")
.add("some story", () => <Button fields={fields}/>)
.add("other", () => <Button fields={fields}/>) None of the stories will have fields knobs available in the UI |
Beta Was this translation helpful? Give feedback.
Answered by
dannyhw
Oct 31, 2022
Replies: 1 comment 3 replies
-
Pretty sure It is possible but you might want to create a function that returns the knob and then call it in the context of a story. It's problematic to call it from outside a story because it might get applied globally. |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
pke
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pretty sure It is possible but you might want to create a function that returns the knob and then call it in the context of a story. It's problematic to call it from outside a story because it might get applied globally.