Storybook: Can toolbar addons appear on DocsPage Previews?

Created on 9 Apr 2020  路  8Comments  路  Source: storybookjs/storybook

Is your feature request related to a problem? Please describe.
I'd like to be able to use toolbar addons, such as @storybook/addon-backgrounds, in conjunction with DocsPage as per the image shown here: https://github.com/storybookjs/storybook/blob/next/addons/docs/docs/media/hero.png

<Preview withToolbar> currently only renders the default buttons for zooming and opening in a new window.

Describe the solution you'd like
An example of how to configure the docs addon to display the @storybook/addon-backgrounds button

Are you able to assist bring the feature to reality?
yes, I'd be happy to collaborate with someone to make this a reality

docs question / support

All 8 comments

Looks like this is related to https://github.com/storybookjs/storybook/issues/6700. I assume there will be some refactoring required before it all works together?

Also related: #8521

gonna close this as dupe to #8521

Sorry this is a different issue. 馃檲 reopening

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

Each addon registers toolbars for the viewModes that it supports. Most addons only support story mode (AKA "Canvas" in the UI), but some addons can support docs mode as well. For example, I enabled this for the Toolbars addon here: https://github.com/storybookjs/storybook/pull/10810

Closing this. LMK if you think there's more to be done!

@shilman thanks. Are there any plans to change some of the other official addons to be available in docs too?

@benedfit see #6700, hopefully in 6.x

Was this page helpful?
0 / 5 - 0 ratings

Related issues

enagy27 picture enagy27  路  69Comments

dependencies[bot] picture dependencies[bot]  路  142Comments

dmmarmol picture dmmarmol  路  57Comments

Olian04 picture Olian04  路  78Comments

ChucKN0risK picture ChucKN0risK  路  74Comments