-
Notifications
You must be signed in to change notification settings - Fork 131
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
not woking with @storybook/react 4.1.4 #90
Comments
Hi |
I try both same result |
@SokolovAlex Ok, I'll check it, thanks for reporting this |
note to myself storybookjs/storybook#4995 |
@SokolovAlex At this moment the best workaround is to downgrade Storybook to v4.0.9 you can check out https://github.com/react-theming/create-material-ui-app with working dependencies |
@usulpro - just out of interest? Why does material ui register break with the new Storybook React? The frustrating thing here is that I can't use |
Hi @alistair-hmh |
Has any progress been made towards resolving this issue? I cannot downgrade storybook because of create-react-app. Otherwise, is there any other (simple) way to provide the theme manually? Edit: I've answered my own question. For anyone using material-ui@next (currently 4.0.0-alpha.1), wrap the targeted component like so:
For the stable branch, I believe it's still appropriate to use MuiThemeProvider from @material-ui/core. I was using the wrong provider, which disguised my issue. |
This may be due to add-on, because starting from 4.1.x you can not import any core node modules in addons. This will lead to compile error, but due to storybookjs/storybook#5584 it will hang without showing error. |
Solved in #92 |
create simple storybook project from
https://storybook.js.org/basics/guide-react/
/// package.json
{
"scripts": {
"storybook": "start-storybook -p 9001 -c .storybook"
},
"devDependencies": {
"@storybook/react": "^4.1.4"
},
"dependencies": {
"@babel/core": "^7.2.2",
"babel-loader": "^8.0.4",
"react": "^16.7.0",
"react-dom": "^16.7.0",
"storybook-addon-material-ui": "^0.8.11"
}
}
/// .storybook/config.js
import { configure } from '@storybook/react';
function loadStories() {
require('../stories/index.js');
// You can require as many stories as you need.
}
configure(loadStories, module);
add addon
import 'storybook-addon-material-ui/register';
after that storybook cant starting
![image](https://user-images.githubusercontent.com/5417142/50475407-b4f2b600-09d5-11e9-873d-dff92104111a.png)
what did i do wrong?
The text was updated successfully, but these errors were encountered: