You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Adding argTypes on a story doesn't result in any options being presented in controls panel.
To Reproduce
Consider the following decorator which provides a value via context which can be changed via a control.
constuserDecorator: DecoratorFn=(Story,context)=>(<UserContext.Providervalue={context.args.user}><Story{...context}argTypes={{ ...context.argTypes,user: {control: 'text'}}}// argType is added to story/></UserContext.Provider>)
Expected behavior
The user control, added by the decorator, is presented in the controls panel.
Actual behavior
Any changes to the argTypes attribute in context or context.parameters makes no difference.
argTypes are defined statically, so the only way to extend them is to annotate a story or the default export in a story file. they can't be extended dynamically with decorators.
Describe the bug
Adding
argTypes
on a story doesn't result in any options being presented in controls panel.To Reproduce
Consider the following decorator which provides a value via context which can be changed via a control.
Expected behavior
The user control, added by the decorator, is presented in the controls panel.
Actual behavior
Any changes to the
argTypes
attribute incontext
orcontext.parameters
makes no difference.System
Additional context
This bug only occurs when setting argTypes in a decorator.
The following works fine:
The text was updated successfully, but these errors were encountered: