question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@storybook/addon-backgrounds@next does not work

See original GitHub issue

Describe the bug I’m trying to use storybook@next. After I installed & set @storybook/addon-background, I faced two problems.

  1. Background tool is not displayed occasionally.
  2. When I tried to set a background (by clicking a color button), it emits the following error.
    TypeError: _this.tooltipRef.current.scheduleHide is not a function
    

To Reproduce

  1. git clone https://github.com/Ailrun/storybook-issue5416
  2. npm i
  3. npm start
  4. Check that there is no background tool just like the screenshot. image
  5. (While running npm start) uncomment line 5-21 of index.js. (FYI, I already set the global parameters in .storybook/config.js)
  6. Check that there is a background tool. (Weirdly…)
  7. Open the web dev tool.
  8. Click the background tool button.
  9. Select grey (or any other colors).
  10. See the error.

Expected behavior Always display the tool, and do not emit any errors.

Screenshots image

System:

  • OS: Manjaro (Kernel 4.18)
  • Device: Desktop
  • Browser: Firefox 64
  • Framework: React
  • Addons: Backgrounds
  • Version: 5.0.0-alpha.10

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
Ailruncommented, Feb 1, 2019

Oh, I notice that it is already fixed in the commit 4687253! It was just not yet released. I will check the lastest version 😃 I think it will work.

Thank you for all your endeavors to make storybook better!

1reaction
tmeasdaycommented, Feb 1, 2019

@ailrun - AFAICT the addon is working. Here is the latest version build of our storybook: https://next--storybooks-official.netlify.com/?path=/story/addons-backgrounds--story-1

You can try yourself with the @storybook/react@next (5.0.0-beta.1) release. Let us know if it is not fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Background addon not working #8575 - storybookjs/storybook
I have applied background addon to my storybook, it is showing those colors as option for selecting as background but on selecting it...
Read more >
Storybook Addon Background Toggle
This addon can be used to add a custom background to one or many target HTML elements. All options are explained below, see...
Read more >
Storybook: background change on prop change
Tired of manually changing the backgrounds in Storybook whenever you change the color theme of your component? With a few lines of code,...
Read more >
problems with storybook with Background parameters
Make sure you have @storybook/addon-backgrounds installed and in the .storybook/main.js file make sure its in your addons: addons: ...
Read more >
Essential Addons
If you don't see the addon panel when running Storybook, you can type A , the shortcut to show/hide the addons panel or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found