简体   繁体   English

如何禁用故事书页面的文档

[英]How do i disable docs for a storybook page

I am using storybook to document the components i am developing.我正在使用故事书来记录我正在开发的组件。 I am using Docs addons to document the components.我正在使用 Docs 插件来记录组件。 The issue i am facing is that i have some pages for which i do not want the docs to show up ie a get started.我面临的问题是我有一些页面我不希望文档显示,即入门。 Consider following screenshot:考虑以下屏幕截图:

在此处输入图像描述

As seen in the image get start page has show code button at bottom right and there is also a border.如图所示,开始页面在右下角有显示代码按钮,还有一个边框。 I do not want these to appear for this page.我不希望这些出现在此页面上。 How can i disable it?我怎样才能禁用它?

If you're using the new CSF format, you can disable docs for a specific story by:如果您使用的是新的 CSF 格式,您可以通过以下方式禁用特定故事的文档:

export const foo = () => <Button>foo</Button>;
foo.parameters = { docs: { disable: true } };

https://github.com/storybookjs/storybook/blob/next/addons/docs/docs/recipes.md#disabling-docs-stories https://github.com/storybookjs/storybook/blob/next/addons/docs/docs/recipes.md#disabling-docs-stories

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM