@storybook/addon-backgrounds@next does not work
See original GitHub issueDescribe the bug
I’m trying to use storybook@next. After I installed & set @storybook/addon-background
, I faced two problems.
- Background tool is not displayed occasionally.
- 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
git clone https://github.com/Ailrun/storybook-issue5416
npm i
npm start
- Check that there is no background tool just like the screenshot.
- (While running
npm start
) uncomment line 5-21 ofindex.js
. (FYI, I already set the global parameters in.storybook/config.js
) - Check that there is a background tool. (Weirdly…)
- Open the web dev tool.
- Click the background tool button.
- Select
grey
(or any other colors). - See the error.
Expected behavior Always display the tool, and do not emit any errors.
Screenshots
System:
- OS: Manjaro (Kernel 4.18)
- Device: Desktop
- Browser: Firefox 64
- Framework: React
- Addons: Backgrounds
- Version: 5.0.0-alpha.10
Issue Analytics
- State:
- Created 5 years ago
- Comments:16 (16 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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!
@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.