Global backgrounds not working in 6.4-alpha
See original GitHub issueDescribe the bug
The backgrounds values in preview.js
appear to be ignored in the 6.4 alpha builds.
To Reproduce
With the following preview.js
file, the backgrounds still only show the standard light
and dark
options
export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
backgrounds: {
default: 'dark paper',
grid: {
disable: true
},
values: [
{name: 'dark paper', value: '#252525', },
{name: 'dark background', value: '#171717', },
{name: 'light paper', value: '#d9d9d9', },
{name: 'light background', value: '#ffffff', },
],
},
}
The option to disable the grid is working as expected.
Additionally, adding the backgrounds settings to the parameters for a story also works as expected (i.e. the background colour options appear as expected)
System Environment Info:
System: OS: Windows 10 10.0.19042 CPU: (16) x64 Intel® Core™ i9-10885H CPU @ 2.40GHz Binaries: Node: 16.3.0 - C:\Program Files\nodejs\node.EXE npm: 7.15.1 - C:\Program Files\nodejs\npm.CMD Browsers: Edge: Spartan (44.19041.964.0), Chromium (92.0.902.62) npmPackages: @storybook/addon-actions: ^6.4.0-alpha.18 => 6.4.0-alpha.18 @storybook/addon-essentials: ^6.4.0-alpha.18 => 6.4.0-alpha.18 @storybook/addon-links: ^6.4.0-alpha.18 => 6.4.0-alpha.18 @storybook/react: ^6.4.0-alpha.18 => 6.4.0-alpha.18
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:10 (6 by maintainers)
Just did the upgrade to 6.4.0 and everything looks good now!
I updated a few times during and alpha and early beta phases and it wasn’t working, but it looks good now so I assume a recent(ish) resolved it.
So sorry, I’m currently on holidays and not really able to use the computer! Will be easier to check this by the end of the month, in case no one else checks it out