storybookjs / storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation
https://storybook.js.org
MIT License
84.22k stars 9.26k forks source link

Toolbar is gone in docs mode #14797

Closed fallemand closed 1 year ago

fallemand commented 3 years ago

image

What's the problem? 1- We build the storybook with build-storybook --docs 2- After that the Toolbar at the top is gone. We need it to switch themes. Is it possible to keep it in docs mode? Do you know any other work around to be able to switch themes using --docs?

Version: 6.2.7

    "@storybook/addon-a11y": "^6.2.7",
    "@storybook/addon-essentials": "^6.2.7",
    "@storybook/vue": "6.2.7",
    "storybook-addon-themes": "^6.1.0",
digitaltopo commented 3 years ago

I have the same issue/use case. Looking to display a theme switcher tool in built storybook docs.

fallemand commented 3 years ago

I found that you can put in preview.js

export const parameters = {
  options: {
    isToolshown: true,
  },
};

And that's keeping the toolbar in docs mode đź‘Ť . Tested in 6.2.7 & 6.2.9

bkerz commented 3 years ago

I have the same issue in development mode (localhost). It seems to scroll down a bit when i click "Docs" button in the toolbar. I tried @fallemand solution but it didn't work for me, maybe i did something wrong but this is my code:

export const parameters = {
  actions: { argTypesRegex: "^on[A-Z].*" },
  controls: {
    matchers: {
      color: /(background|color)$/i,
      date: /Date$/,
    },
  },
  options: {
    isToolsShown: true,
  },
};

I hope this problem can be fixed soon, this is a annoying bug

shilman commented 1 year ago

We’re cleaning house! Storybook has changed a lot since this issue was created and we don’t know if it’s still valid. Please open a new issue referencing this one if: