storybook Questions

6

I've been attempting to use the useRouter hooks from Next.js inside Storybook. However, every time I load up Storybook, I get 'cannot read property 'pathname' of null'. How might I resolve this iss...
Bowie asked 1/6, 2020 at 18:19

5

I have rails engine project using storybook and mdx files to specify the controls but i need to hide specific control per story <Meta title='Label Component' story='with_tooltip' args={{ obj...
Allegedly asked 5/9, 2021 at 6:34

2

I've an app built with create-react-app. I've added storybook (in accordance to this manual https://storybook.js.org/docs/guides/guide-react/). When I run yarn storybook, I get this error. 'loose...
Ernesternesta asked 6/6, 2020 at 17:9

6

CLI Tool: Storybook Framework: Vue/ Nuxt Issue: I'm trying to pull in global SCSS variables to Storybook Stories so they run the components the same way as they do in Nuxt, I've tried the custom w...
Nitroglycerin asked 13/6, 2018 at 22:17

5

Solved

I have a react application with a custom Webpack configuration. After adding Webpack aliases that matches tsconfig.json file compilerOptions->paths field the aliases were recognized by webpack. ...
Thurlow asked 30/3, 2022 at 13:16

3

I am using storybook in a monorepo. In my root folder in preview.js I have this: export const decorators = [ (Story) => { const theme = createTheme("violet", "gray"); cons...
Paramorphism asked 25/4, 2022 at 2:14

2

I have just started using Storybook for a UI component lib I am working on. I wanted to extract JSDoc written for JS class methods and properties into Storybook and create a Doc. Storybook does sup...
Luna asked 12/8, 2020 at 11:31

5

Solved

I am trying to setup Storybook with Typescript using babel-loader and ts-loader. Everything works fine except using children in a React component: [tsl] ERROR in .../stories/index.stories.tsx(8,5...
Sumikosumma asked 24/3, 2020 at 23:8

3

Solved

I'm using Storybook with React, and trying to add storybook select control with default value, but with no success. There's nothing about that in documentation. I need one of the options above to...
Bly asked 19/4, 2022 at 9:35

12

I am using Storybook version 3.3.15 on Windows 7 running node version 6.3.1 and npm version 3.10.6. On running storybook, I see 'No panels Available' message in the bottom of the page where actio...
Pinhead asked 24/3, 2018 at 19:14

4

Solved

I am using storybook documentation and couldn't load images from assets folder. As documentations says: "if you are using a custom Webpack config, you need to add the file-loader into your custom W...
Translator asked 7/10, 2019 at 10:39

1

Solved

I am new to storybook as well as typescript, I am stuck, when creating a decorator which takes two parameters Story and context. const CustomDecorator = (Story, context) => { console.log("...
Delmydeloach asked 19/8, 2023 at 5:59

2

I am using Storybook with webpack 5 for a simple project and I'm having challenges with CSS module imports despite customising the webpack config for storybook. (2:7) src/stories/header.css Unknown...
Uprising asked 14/1, 2022 at 10:14

2

According to Storybook's doc: https://storybook.js.org/docs/react/workflows/stories-for-multiple-components // List.stories.ts | List.stories.tsx import React from 'react'; import { List, ListPro...
Nether asked 20/8, 2021 at 7:20

2

Solved

I just started using storybook, and I need your help. I've four components for the different icons, and I want to create one story for all of them instead of creating story for each of them. I've A...
Saadi asked 27/1, 2022 at 12:36

1

I'm looking to generate a .stories.ts file inside a component folder once we have run ng g component my-component. The final result should look somehting like this: my-component -my-component.com...
Essayist asked 5/10, 2021 at 16:37

3

The nextjs docs (https://nextjs.org/docs/basic-features/static-file-serving) state to add image file paths under the public directory. I have a component that renders an image component and the fil...
Capping asked 22/9, 2020 at 20:0

2

I'm installing Storybook on my React components library. When I go with npm run storybook I receive this error: Error: You must specify a framework in '.storybook/main.js' config. But in main.js t...
Plasmosome asked 3/4, 2023 at 9:38

2

I have an input web component that has a very simple API - it has both a get state() and a set state(model). This web component also handles the label which is being used for the input, thus a simp...
Tenebrae asked 17/9, 2021 at 8:23

2

I installed storybook by using npx tsdx create and selected react-with-storybook to make style component library. while developing, I got 'This story is not configured to handle controls. ' error....
Rabaul asked 9/2, 2022 at 16:40

5

Solved

My error in the first place is exactly the same as the one described here. I'm using the @svgr/webpack package to import my .svg files as a React component like that: import Shop from './icons/shop...
Whirlybird asked 29/4, 2020 at 9:34

3

Is there a way to register global Vue components in Storybook so it is compatible with globally registered Vue components in Vue-CLI?
Camarata asked 24/1, 2021 at 20:53

1

This is my button component type import React from 'react' export type ButtonProps = { label: string; color?:'primary' | 'secondary' | 'tertiary'; size?:'mobile' | 'tablet' | 'desktop', handleC...
Hispid asked 31/5, 2023 at 12:55

1

Solved

Initial Question: My setup all works as it should, but I have one problem: my custom fonts don't load in Storybook. (My main question is about the missing CSS variable, go to the bottom to see it. ...
Joly asked 2/9, 2023 at 9:50

2

Solved

I have a hover style in my component: const style = css` color: blue; &:hover { color: red; } `; Can you mock this in Storybook so that it can be shown without having to manually hover...
Daryl asked 27/5, 2020 at 12:43

© 2022 - 2024 — McMap. All rights reserved.