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

[vuetify]: error with recipe code that prevents controls from updating the story #571

Open
buggedcom opened this issue Jun 30, 2023 · 0 comments
Assignees

Comments

@buggedcom
Copy link

Details

Recipe Page: vuetify
Recipe Template: vuetify
Browser:

What is wrong

Your code in the // .storybook/withVeutifyTheme.decorator.js does not allow the controls to update the component.

The code should be

export const withVuetifyTheme = (storyFn, context) => {
  // Pull our global theme variable, fallback to DEFAULT_THEME
  const themeName = context.globals.theme || DEFAULT_THEME;
  const story = storyFn();
  return h(
    StoryWrapper,
    // give themeName to StoryWrapper as a prop
    { themeName },
    {
      story: () => h(story, { ...context.args }),
    }
  );
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants