Questions tagged [storybook-addon-specifications]

This addon for Storybook will allow you to write tests based on your stories and display results directly inside Storybook.

This addon for Storybook will allow you to write tests based on your stories and display results directly inside Storybook.

https://www.npmjs.com/package/storybook-addon-specifications

36 questions
13
votes
2 answers

Storybook - Addon value should end in /register OR it should be a valid preset

Even thought my storybook still builds normally, I started getting this error on my terminal ERR! Addon value should end in /register OR it should be a valid preset https://storybook.js.org/docs/react/addons/writing-presets/ ERR!…
danihazler
  • 413
  • 1
  • 6
  • 13
9
votes
3 answers

Disable canvas per story in storybook 6

I am trying to find a way to disable canvas at a story level in the new storybook 6. I am making a library of components and, depending on the story, some of them will only have canvas, while others will only have docs. I have tried…
Cipriana
  • 333
  • 3
  • 13
6
votes
1 answer

How to make React storybook 'addon-links' work

I am trying to use addon-links. I tried the exact simple button example listed in the documentation, https://www.npmjs.com/package/@storybook/addon-links. LinkTo react component works fine but when I use linkTo function I get "could not navigate to…
Sai
  • 245
  • 1
  • 3
  • 12
6
votes
1 answer

Storybook: pass props defined in the contexts file to components

How can I pass props defined in the contexts file to components in my stories? Docs does not make this clear: https://www.npmjs.com/package/@storybook/addon-contexts I am using vue. Is there a working example of someone using addon-contexts?
fr00t
  • 681
  • 1
  • 4
  • 19
5
votes
3 answers

Test angular component @Output using Storybook and Cypress

I am trying to test the output of an angular component. I have a checkbox component that output its value using an EventEmitter. The checkbox component is wrapped in a storybook story for demo and testing purposes: export const basic = () => ({ …
5
votes
3 answers

How can I use 'selectedPanel` in storybook?

I noticed a property in Storybooks Options Docs called selectedPanel which I assume will allow me to pre-select an addon panel. I'm unclear on how to use it. The example is: options: { selectedPanel: 'storybook/a11y/panel' } What I don't…
linuxdan
  • 4,476
  • 4
  • 30
  • 41
3
votes
1 answer

Storybook for React to show plain HTML source code with Addon

I am using Preview addon in Storybook for React to show the component usage in Docs.
Bhupendra
  • 1,196
  • 16
  • 39
3
votes
2 answers

How to show subheading in Storybook?

I need to show subheadings in the left sidebar as shown in the attached picture. Storybook version is 5.3.13. Is there any parameter i need to change in the config file?
3
votes
1 answer

Storybook Knobs not updating

I have setup storybook for my react project, and i have 2 stories. One that is a simple button and a larger component. I use knobs for both, it works fine of the simple button but it dose not update the larger component (The withInfo addon actaully…
Androme
  • 2,399
  • 4
  • 43
  • 82
2
votes
0 answers

How to pass 'nonce' option to the @emotion/cache which is a dependency of @emotion/core?

Using storybook for preact demos and webpack bundles @emotion/core -> @emotion/cache -> @emotion/sheet which is inserting styles to iframe headers causing multiple CSP errors for styles like below
2
votes
1 answer

Storybook Viewport Addon: Custom Viewports Do Not Build (react)

I built an app using create-react-app. I create custom viewport types to add to my storybook. When I use yarn start everything builds fine and works. But when I build the app the viewports that I globally defined my preview.js file are not loading…
1
vote
1 answer

How to change storybook base URL

does anyone know how to set up a different base URL for storybook? when you run "npm run storybook" it opens up on http://localhost:6006/, how can i get it to open up on http://localhost:6006/storybook/?
1
vote
1 answer

How do I render an MD file for a custom Storybook addon?

I am trying to render an MD file passed through parameters. I can successfully get the text to display, but I really want to get it formatted like an MD file. I was trying to use @storybook/addon-docs but it appears these need to be used in an MDX…
1
vote
1 answer

Storybook: hide 'show code' button inside an Angular project

Do you know if is possible to remove the 'show code' button below the component? because the output it's weird. I am using the package '@storybook/addon-docs'
1
vote
0 answers

Working with React's useContext via Storybook

I'm trying to access data in the contextAPI via storybook but I couldn't manage it. Please, keep in mind that there isn't any issue with the original pages, the context is working properly. React version: 17.0.2 Storybook version: 6.2.7 Here is the…
1
2 3