Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addon:Docs hide zoom feature for Primary story #16771

Closed
idesigncode opened this issue Nov 24, 2021 · 2 comments
Closed

Addon:Docs hide zoom feature for Primary story #16771

idesigncode opened this issue Nov 24, 2021 · 2 comments

Comments

@idesigncode
Copy link
Contributor

Is your feature request related to a problem? Please describe
Unable to hide the zoom feature for the Primary component (without hiding the whole toolbar).

Describe the solution you'd like
Hide the zoom buttons on the Primary component with:

  • The existing toolbar.zoom.hidden: true config (for global/story parameters).
  • A new Primary component prop.

Describe alternatives you've considered

  • Using MDX Canvas component to display the primary story with the prop withToolbar={false}.
  • Using MDX Story component to display the primary story + toolbar.zoom.hidden: true configuration(s).

Are you able to assist to bring the feature to reality?
I can test but not familiar with the source code.

Additional context
Using v6.3.4 of @storybook/addon-docs, @storybook/addons & @storybook/react

@shilman
Copy link
Member

shilman commented Nov 24, 2021

This is the recommended workaround: https://storybook.js.org/docs/react/writing-docs/docs-page#remixing-docspage-using-doc-blocks

You could replace <Primary /> with <Story id="^" /> which is the first story

@shilman
Copy link
Member

shilman commented Jun 18, 2023

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 this is still relevant in SB 7.x.

@shilman shilman closed this as not planned Won't fix, can't repro, duplicate, stale Jun 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants