Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using a global parameter causes refresh / HMR issues #92

Closed
shamilovtim opened this issue Mar 25, 2021 · 3 comments
Closed

Using a global parameter causes refresh / HMR issues #92

shamilovtim opened this issue Mar 25, 2021 · 3 comments

Comments

@shamilovtim
Copy link

Inside of preview.js add:

export const parameters = {
  design: { accessToken: 'your token' }
};

The Figma file will load if the parameter is applied globally, but once clicking elsewhere in storybook it will cause refreshes / flashes and whitescreens.

@pocka
Copy link
Collaborator

pocka commented Mar 28, 2021

What version of Storybook are you using? Any console errors?

Probably the problem is outside of the figspec renderer (maybe in outermost addon logic or Storybook core?)

https://github.com/pocka/storybook-addon-designs/blob/release/v6.0/packages/storybook-addon-designs/src/register/components/Figspec.tsx#L82-L84

@shamilovtim
Copy link
Author

What version of Storybook are you using? Any console errors?

Probably the problem is outside of the figspec renderer (maybe in outermost addon logic or Storybook core?)

https://github.com/pocka/storybook-addon-designs/blob/release/v6.0/packages/storybook-addon-designs/src/register/components/Figspec.tsx#L82-L84

"storybook-addon-designs": "6.0.0-alpha.3",
"@storybook/addon-essentials": "6.2.0-rc.9",
"@storybook/react": "6.2.0-rc.9"

@shamilovtim
Copy link
Author

Fixed. Required the withDesign decorator on the individual components for the whole system to work together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants