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
I’m building my first addon for a project and I have a set of fields which allow for custom colours. I want to use the new 6.0 colour input to then share this state to an emotion theme provider. I’m just wondering what the best way to do this is? Storybook threw an error when I tried to access useAddonState within a decorator which lead me to think maybe I needed to use useChannel and communicate that way but I got a similar undefined error since the preview I don’t think has access to these hooks.
My state is really just { primary: string, secondary: string, ctaLink: string } so nothing fancy.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I’m building my first addon for a project and I have a set of fields which allow for custom colours. I want to use the new 6.0 colour input to then share this state to an emotion theme provider. I’m just wondering what the best way to do this is? Storybook threw an error when I tried to access useAddonState within a decorator which lead me to think maybe I needed to use useChannel and communicate that way but I got a similar undefined error since the preview I don’t think has access to these hooks.
My state is really just
{ primary: string, secondary: string, ctaLink: string }
so nothing fancy.Any advice would be helpful.
Beta Was this translation helpful? Give feedback.
All reactions