rbardini / storybook-addon-paddings

🔲 A Storybook addon to add different paddings to your preview
https://storybook-addon-paddings.rbrd.in
MIT License
30 stars 2 forks source link

Using this addon with Angular #5

Closed kasszz closed 4 years ago

kasszz commented 4 years ago

I'm trying to use this addon for storybook with Angular but I get this error:

Error: Unexpected value 'undefined' declared by the module 'DynamicModule' at syntaxError (http://localhost:4400/vendors~main.7047000be75dc3c081a8.bundle.js:8364:17) at http://localhost:4400/vendors~main.7047000be75dc3c081a8.bundle.js:27800:40 at Array.forEach (<anonymous>) at CompileMetadataResolver.push../node_modules/@angular/compiler/fesm5/compiler.js.CompileMetadataResolver.getNgModuleMetadata (http://localhost:4400/vendors~main.7047000be75dc3c081a8.bundle.js:27798:54) at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._loadModules (http://localhost:4400/vendors~main.7047000be75dc3c081a8.bundle.js:33910:51) at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileModuleAndComponents (http://localhost:4400/vendors~main.7047000be75dc3c081a8.bundle.js:33891:36) at JitCompiler.push../node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler.compileModuleAsync (http://localhost:4400/vendors~main.7047000be75dc3c081a8.bundle.js:33851:37) at CompilerImpl.push../node_modules/@angular/platform-browser-dynamic/fesm5/platform-browser-dynamic.js.CompilerImpl.compileModuleAsync (http://localhost:4400/vendors~main.7047000be75dc3c081a8.bundle.js:74246:31) at compileNgModuleFactory__PRE_R3__ (http://localhost:4400/vendors~main.7047000be75dc3c081a8.bundle.js:63073:21) at PlatformRef.push../node_modules/@angular/core/fesm5/core.js.PlatformRef.bootstrapModule (http://localhost:4400/vendors~main.7047000be75dc3c081a8.bundle.js:63300:16)

I use the install guide from your README.md. Is this a problem because the addons are made with only React in mind or am I doing something wrong?

Thanks!

rbardini commented 4 years ago

Hi @kasszz! It's a React-based addon, but it should work fine with any framework. I just tested it in the official angular-cli example and got the same error as you though 😕

I think it can be caused by the usage of react-easy-state to maintain the selected padding option between stories. I'll try to replace it with the addon devkit when I have some time and see if it fixes the issue.

kasszz commented 4 years ago

Thanks for looking into it! Please keep me posted on the progress :)

github-actions[bot] commented 4 years ago

:tada: This issue has been resolved in version 2.0.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: