Open
Description
openedon Jun 19, 2019
Bug or support request summary
HI,
What we are trying to do, is to hide the knobs/actions panel per story. For example, on our welcomes page, we don't need it. So we used the options-addon to hide it for this "component".
And it works, BUT it also hides the panel for the rest of the stories.
What we want is to be able to hide the panel for one story and let it re-appear once we switch stories.
We know we can add the options again to the existing story, making it so that it shows up again, but I think that shouldn't be the only solution, no?
Steps to reproduce
- Install the @storybook/addon-options
- add the { options: { showPanel: false } } to a story of your choice
- launch storybook and see if the panel is gone.
- Now, switch stories.
Result: the panel is hidden for every story.
Expected result: the panel should be hidden on 1 story, and shown for the others.
Please specify which version of Storybook and optionally any affected addons that you're running
"@storybook/addon-actions": "^5.1.8",
"@storybook/addon-info": "^5.1.8",
"@storybook/addon-knobs": "^5.1.8",
"@storybook/addon-links": "^5.1.8",
"@storybook/addon-options": "^5.1.8",
"@storybook/addon-storyshots": "^5.1.8",
"@storybook/addons": "^5.1.8",
"@storybook/react": "^5.1.8",
"babel-plugin-require-context-hook": "^1.0.0",
"identity-obj-proxy": "^3.0.0",
"node-sass": "^4.12.0",
"prop-types": "^15.7.2",
"react-chromatic": "^0.8.4",
"react-content-loader": "^4.2.1",
"react-number-format": "^4.0.7",
"react-popover": "^0.5.10",
"sass-loader": "^7.1.0",
"styled-components": "^4.2.0"
Affected platforms
- Versie 75.0.3770.100 (Officiële build) (64-bits)
Screenshots / Screencast / Code Snippets (Optional)
This is the code used to create the story that hides the panel. And it works. But hides the panel for the rest of the stories also.
import React, { Fragment } from 'react';
import { storiesOf } from '@storybook/react';
const Welcome = () => {
return (
<Fragment>
<h1>Welcome</h1>
</Fragment>
);
};
storiesOf('Welcome', module).add('Getting started', () => <Welcome />, { options: { showPanel: false } });
End bug report support request - delete the rest below
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment