英文:
Storybook create a hidden story to be included in mdx docs
问题
我正在为Storybook中的一个复杂组件创建文档,并希望在mdx文件中创建一个工作示例。通常,我的做法是使用Story标记将一个故事集成到我的mdx中。
是否有一种方式可以创建一个故事以集成到我的mdx中,但不会在侧边栏中与其他故事可见?我正在使用Storybook 7,我的组件是使用Vue制作的(尽管我认为这与问题无关)。
英文:
I'm creating documentation for a complex component in Storybook and would like to create a working example inside an mdx file. To do this my approach is usually to integrate a story into my mdx using the Story tag.
Is there a way to create a story to bo integrated into my mdx but without it being visible with the other stories in the sidebar?
I am using storybook 7 and my components are made with vue (although I think this is irrelevant).
答案1
得分: 0
我已经将一个 display:none 规则添加到 manager-head.html 文件中的侧边栏按钮(通过它们的 id)在 .storybook 文件夹中。
英文:
For anyone looking for a solution to this question, I ended up with the followind solution:
I have added a display:none rule to sidebar buttons (by their id) in the manager-head.html file in the .storybook folder.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论