storybook Questions

2

i'm using nextjs 13, tailwindcss. trying to run storybook for the project would throw : ModuleNotFoundError: Module not found: Error: Can't resolve '/images/example.png' in 'C:\repos\mvp\src\styles...
Urrutia asked 24/4, 2023 at 12:59

1

Is there a way to execute setup and cleanup steps for a story in Storybook? Say, for example, I have a component that behaves differently contingent on the presence or value of some piece of local ...
Decani asked 16/12, 2021 at 18:20

1

Solved

I'm trying to see if there's a way to change the width for select stories. My component is 100% width which I don't want to change because it is 100% of the parent. For Storybook that would be wher...
Pitchblende asked 23/5, 2023 at 16:16

1

I am currently developing a component library in React within a mono-repository. I have the lint-staged package to run my linting and unit testing NPM scripts when I make a commit to the repository...
Individuate asked 28/6, 2023 at 11:6

7

Solved

I want to add tailwind to storybook. So that Stories will render just like it will render on web. I used create-react-app project-name --template typescript to create the project. Then to install t...
Arrowood asked 29/12, 2020 at 17:4

4

Solved

PS C:..project\src\features> npm run storybook > [email protected] storybook > start-storybook -p 6006 'start-storybook' is not recognized as an internal or external command, operab...
Jacobba asked 13/11, 2021 at 14:2

1

When I run storybook, my aliases are ignored. It work fine when I run my project. I tried to define all my aliases in the main.js file, but i doesn't work better. Do you know why ? I've already vis...
Gisborne asked 17/2, 2023 at 11:11

2

Running Storybook I'd like to navigate to my component and play with Docs tab and check its behavior as I change control value for each property. I implemented a component Footer that could receive...
Airel asked 17/3, 2022 at 21:53

5

Solved

How do i disable the 'docs' (addons-docs) tab on a per story basis? I've tried adding the key values below to a story, but nothing seems to work. parameters: { docs: { disable: true, hidden: tru...
Salvucci asked 27/1, 2020 at 14:31

2

After installing Storybook into a React.js app with ESLint, the VSCode linter wasn't picking up the @storybook/react imports in the examples .stories.js files. It is giving me the following error: ...
Holystone asked 4/1, 2022 at 22:41

3

I'm using @storybook/vue": "^6.5.10". My components are styled by the <style> block in the bottom of each .vue file. There are also some global CSS (Sass) files that are compil...
Hanhana asked 23/9, 2022 at 16:44

0

I'm looking for a solution for my story. I've trying to pass some props from a mock component to a story. Some props can be define outside the component but register and error should be pass by the...
Therewithal asked 23/5, 2023 at 15:59

1

I'm trying to use Storybook following https://turbo.build/repo/docs/handbook/tools/storybook guide (I'm using pnpm). apps/workshop/package.json { "name": "workshop", "pri...
Lamar asked 7/4, 2023 at 12:19

2

I have a simple component that requires the following to setup globally... const app = createApp(App); app.config.globalProperties.Icons = Icons; However, when I am constructing my Storybook story...
Petua asked 31/8, 2021 at 19:3

4

I'm running Storybook 6.1.21. At some point it stopped loading on localhost:6006. On localhost it loads a white page in the browser and logs this to the console: GET http://localhost:6006/main.daf8...
Shuffleboard asked 5/3, 2021 at 14:49

3

Solved

I want to get this: My stories.tsx code looks like this: export default { title: "Components/Switch", argTypes: { color: { control: "select", options: ["primary", ...
Khosrow asked 28/8, 2020 at 21:34

2

In storybook, I'm getting the following error: No QueryClient set, use QueryClientProvider to set one In my _app.tsx: const queryClient = new QueryClient(); const MyApp = ({ Component, pageProps ...
Huston asked 9/8, 2022 at 7:11

3

I am able to run storybook and develop react components within the storybook project folder successfully. However, I am trying to move the folder that contains all my components up a level (to be a...
Tallu asked 13/6, 2019 at 0:33

6

Solved

Problem While using Storybook, I am running npm run storybook and getting the error below. ModuleBuildError: Module build failed (from ./node_modules/style-loader/dist/cjs.js): TypeError: this.getO...
Famed asked 29/7, 2021 at 17:13

1

Right now in my team we are using Storybook v6 and the @storybook/addon-docs package in order to generate documentation for components. In order to keep the .stories.mdx files small we write the st...
Redness asked 3/1, 2022 at 17:45

2

I'm on a project with a storybook and I want my story to be able to change the background or put a background whatever since I only need a background of a different color but I can't put background...
Vasiliu asked 12/2, 2021 at 21:1

3

Solved

everything was fine yesterday. this problem occurs after I installing prop-types in my create-react-app project. the error message is as follows: Can someone tell me where the problem is and how to...
Ingeingeberg asked 26/5, 2020 at 6:0

2

I am creating my own React component library. The package.json is using react and react-dom as peer dependencies because I only want to ship code for components only. This package will then be used...
Mammillary asked 10/12, 2020 at 17:11

2

I have updated angular from 11 to 12 and I have also updated all packages to the latest versions in my package.json: { "name": "poc-architecture-angular", "version"...
Narrow asked 13/9, 2021 at 8:7

9

Solved

I'm trying to load up the demo storybook stories (withText, withIcon), using this react guide, but I cannot get any of the example stories to run. For the avoidance of doubt, here's the code file ...
Pilsner asked 3/4, 2020 at 11:51

© 2022 - 2024 — McMap. All rights reserved.