storybook | Storybook integration with Nuxt.js | Frontend Framework library
kandi X-RAY | storybook Summary
kandi X-RAY | storybook Summary
Storybook integration with NuxtJS.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of storybook
storybook Key Features
storybook Examples and Code Snippets
Community Discussions
Trending Discussions on storybook
QUESTION
I am setting up a Storybook with RemixJS. I got the following error when trying to import a component
...ANSWER
Answered 2022-Mar-11 at 12:09Depending on the webpack version you are using to build your Storybook you need to add fs
, stream
and other Node core module used by Remix packages.
As a rule of thumb you can use the list from Webpack documentation on resolve.fallback
here.
If you are using Stroybook with Webpack 4 the config should look like :
QUESTION
I'm using Preact with styled-components (storybook) and webpack to build my project
I have a component called AlphaBarWrapper
with a styled component inside of it called StyledAlphabar
.
Styled Components is adding AlphaBarWrapper_StyledAlphaBar-sc-[random string]
as a classname to my component when rendered.
I'd like this to be the standard sc-[random string]
class name instead. I can't find any documentation on why it is rendering this.
This occurs in both a standard webpack build and the storybook build, so I expect that there's an option that I'm missing.
...ANSWER
Answered 2022-Mar-16 at 13:21If i'm right understood your issue you need install babel-plugin-styled-components
. Then in the root directory create .babelrc
and put this code:
QUESTION
My component 'ReportWrapper' is something like below where it import 'getReportData' which in turn return data async.
...ANSWER
Answered 2022-Mar-07 at 08:02If I understand correctly you want to use a different getReportData
in stories. I read this as mocking a module in stories.
I managed to do this using Storybook's webpackFinal
config and to add a webpack plugin - webpack's NormalModuleReplacementPlugin
.
Basically you can replace a module in stories using this approach.
You could try this in your storybook config:
QUESTION
I'm trying to play around with Reactjs, storybook and tailwind to create a custom UIUX library, but I cannot make work the conditional rendering of the classes, it won't work in the storybook at least (for any class, rounded, bg-color, color, etc), I cannot see any change and inspecting the CSS, no CSS is applied.
EDIT:
The classes I'm trying to add are not concatenated, they are full class names such as "bg-red-500", "bg-green-600", etc.
I have this code:
...ANSWER
Answered 2022-Feb-19 at 21:36I suspect there are 2 issues with your code.
1st which i'm absolute certain is that you shouldn't concatenate tailwind classes because these classes can't be detected by tailwind therefore are not included in the compiled file. You can read more here.
that said if you insist, you could safelist the classes you want to concatenate.
and 2nd if regular classes are not working, then you should make sure all the files with tailwind classes are included in the content
array in tailwind config file
QUESTION
I am working on project upgrade from Vue 2 to Vue 3. The code base changed according to Vue migration documents: https://v3.vuejs.org/guide/migration/introduction.html#overview. I have mismatch of above mentioned libraries. Does somebody has a running project and would share their working library versions
Current mismatch error is :
...ANSWER
Answered 2022-Feb-18 at 14:50My colleague solved it by moving to Vite. My suggestion would be to drop webpack and use Vite instead.
Migration guide for Vue 2 to 3 here: https://v3-migration.vuejs.org/ Vuetify migration guide: https://next.vuetifyjs.com/en/getting-started/upgrade-guide
QUESTION
Problem
While using Storybook, I am running npm run storybook
and getting the error below.
ANSWER
Answered 2021-Jul-29 at 17:17Solution
After taking a step back, I realized that I could try out what I did to fix the sass-loader
issue: downgrading major versions.
Steps
- Downgraded
style-loader
1 major version to2.0.0
:npm i style-loader@2.0.0
- Then, as luck would have it, I ran into the same issue with
css-loader
- Downgraded
css-loader
1 major version to5.2.7
:npm i css-loader@5.2.7
Summary
By downgrading all of the loaders one major version, I was able to get it to work.
QUESTION
I am facing an issue where the MUI theme works in codesandbox but not in storybook
Demo to show it working WITHOUT storybook: https://codesandbox.io/s/typescript-material-ui-textfield-ojk3h?file=/src/App.tsx
Demo showing that it breaks WITH storybook Git repo: https://github.com/EdmundMai/mui-v5-storybook
This is my component:
...ANSWER
Answered 2021-Dec-07 at 01:55Holy moly I fixed it. So apparently there is an incompability with Storybook <6.3 since it relies on @emotion/styled v10, while MUI v5 must use v11.
https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#emotion11-quasi-compatibility
This is how I fixed it
QUESTION
I am migrating a library to use Angular and Material 12 (currently in version 10), and Storybook is used to expose the various components of this library. To do so, I upgraded Angular and Material to version 12 with the Angular Update Guide, Storybook to version 6.3 with npx sb upgrade
and I followed the steps described here to fully migrate Storybook and use webpack5.
Unfortunately, the base.scss file previously included globally in the rendering of stories is no longer included (stories are now without any CSS). This base.scss file is included in a Typescript file with:
import '!style-loader!css-loader!sass-loader!./base.scss';
With Storybook 6.3 and Angular 10, everything works perfectly.
To fix that, I tried to add this configuration in main.js, as it is described in the documentation:
...ANSWER
Answered 2021-Oct-15 at 14:38I have answered my question. In fact there was no need to change the webpack configuration for my case. It was enough to add the @storybook/preset-scss
addon.
The problem was described here. I needed to downgrade Angular to 12.1 version. I was in 12.2.
Hopefully this helps someone.
QUESTION
ANSWER
Answered 2022-Feb-08 at 19:42Found the answer here -> https://github.com/storybookjs/storybook/issues/15336
The solution is simply to add the following to .storybook\main.js
QUESTION
When I run npm ci
on Github Actions I got the error:
ANSWER
Answered 2021-Sep-20 at 20:57Solved removing packages-lock.json and running again using NodeJS 14 (was 10)
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install storybook
Add @nuxtjs/storybook dependency to your project:
Add .nuxt-storybook and storybook-static to your .gitignore:
Start adding stories
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page