Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用 MDX 创建了一个故事。我想展示我的内部风格的按钮。
故事包含以下内容:
<a class="btn btn-primary"> Primary Button </a>
渲染时,故事书显示
<a class="sbdocs sbdocs-a btn btn-primary css-19nbuh3" target="_top"> Primary Button <a>
结果,我的按钮没有显示正确的 css。
如何防止 Storybook MDX 更改标记?
将您的标记放在<Preview>标签内:
<Preview>
<Preview> <a class="btn btn-primary"> Primary Button </a> </Preview>