-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Problems with webpack configuration - Material-UI decorator #463
Comments
you should add |
@tinybug ok I see the problem. In React Storybook I'll have to add the |
@PolGuixe I try to add decorator before add story like this, but it doesn't work...😵:
|
@tinybug could you look at out docs on how to write a decorator properly: https://getstorybook.io/docs/addons/ |
@arunoda nice!
@PolGuixe you can work like this. |
Thanks @tinybug Anyway, feel free to re-open this if needed. |
I would also recomend to add this bit of code:
It is a dependency for Material-UI, otherwise it will throw an error |
That's because of calling injectTapEventPlugin(); on each re-render. Just wrap it with try/catch. try {
injectTapEventPlugin();
} catch (e) {}
addDecorator(story => (
<MuiThemeProvider>
{story()}
</MuiThemeProvider>
)); |
I am trying to use different npm modules (Material-ui, etc) , but they don't seem load properly.
The error message I get is:
I am using Meteor, hence the only Webpack configuration I have is the one for Storybook:
Here is the story:
Here is the component:
What I am missing?
The text was updated successfully, but these errors were encountered: