storybook icon indicating copy to clipboard operation
storybook copied to clipboard

Toolbar - Hide only background button but keep grid button

Open iKrishnaSahu opened this issue 2 years ago • 0 comments

Describe the bug Is there any way to hide background button without hiding grid button? Currently snippet provided in reproduction section is hiding both background as well as grid button. My requirement is to hide only background button.

To Reproduce

Use below code in preview.js file

export const parameters = {
  ...
  toolbar: {
    'storybook/background': { hidden: true }
  }
}

Before image

After

image

System Environment Info:

System: OS: Windows 10 10.0.19044 CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz Binaries: Node: 16.15.1 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD npm: 8.15.1 - C:\Program Files\nodejs\npm.CMD Browsers: Edge: Spartan (44.19041.1266.0), Chromium (103.0.1264.77) npmPackages: @storybook/addon-essentials: ~6.5.4 => 6.5.9 @storybook/angular: ~6.5.4 => 6.5.9 @storybook/builder-webpack5: ~6.5.4 => 6.5.9 @storybook/core-server: ~6.5.4 => 6.5.9 @storybook/html: ^6.5.8 => 6.5.9 @storybook/manager-webpack5: ~6.5.4 => 6.5.9 @storybook/preset-scss: ^1.0.3 => 1.0.3

Additional context Add any other context about the problem here.

iKrishnaSahu avatar Aug 04 '22 13:08 iKrishnaSahu