Dynamic ArgTypes options #17423
Unanswered
webistomin
asked this question in
Help
Replies: 1 comment
-
Related. storybook/code/core/src/manager-api/root.tsx Line 516 in 71d100b |
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
-
Hi! I ran into a problem. I don't know how to change
ArgTypes
options.Let's say I have a button that accepts a color prop with values
"red"
and"blue"
.I have an addon that switches themes. So, in one theme, I need the options to be
['red', 'blue']
and in the other, like this['green', 'yellow']
. I saw there is a hook for changing arguments –useArgs
, but it did not help me.Maybe there is some hook like
useArgTypes
s that would allow you to change the array of options?Beta Was this translation helpful? Give feedback.
All reactions