-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
UI: Add viewMode
parameter to control story nav UI
#9090
Conversation
This pull request is being automatically deployed with ZEIT Now (learn more). 🔍 Inspect: https://zeit.co/storybook/monorepo/24efd6pvp |
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! |
viewMode
parameter for controlling a story link's view mode
viewMode
parameter for controlling a story link's view modeviewMode
parameter to control story link's view mode
viewMode
parameter to control story link's view modeviewMode
parameter to control story nav UI
@atanasster thanks for figuring this out--will make a bunch of users happy. i cleaned up the code slightly and added tests/documentation. |
Thanks, one down.... :) |
This is great! Thanks! |
This is not working for me. I've tried:
// .storybook/preview.js
import { addParameters } from "@storybook/react"
addParameters({ viewMode: "docs" })
// src/componenets/component.stories.js
export default {
title: "Components/Component",
parameters: {
viewMode: "docs"
}
}
// src/componenets/component.stories.js
const ComponentStory = () => <Component />
ComponentStory.story = {
parameters: {
viewMode: "docs"
}
} ...none of these variations are working for me? I'm using the latest version (5.3.14) of Storybook and the official addons inc. docs. |
@wagerfield this is a 6.0 feature |
Thanks @shilman, I've upgraded to |
I can't get this to work on the latest alpha (31). Checking here https://next--storybookjs.netlify.com/official-storybook/?path=/story/addons-docs-buttongroup--basic and it does not seem to work either. Can you confirm this? EDIT: looks already to be captured here - #9723 |
Issue: #8630
What I did
viewMode
parameter in the sidebar linksHow to test
The subcomponents.story (Addons/Docs/ButtonGroup) will default its anchor to the
docs
tab