previewBody
¥Parent: main.js|ts configuration
类型:(body: string) => string
¥Type: (body: string) => string
以编程方式调整 Storybook 的 预览 <body>
。最常由 插件作者 使用。
¥Programmatically adjust the preview <body>
of your Storybook. Most often used by addon authors.
如果你不需要以编程方式调整预览主体,则可以将脚本和样式添加到 preview-body.html
。
¥If you don't need to programmatically adjust the preview body, you can add scripts and styles to preview-body.html
instead.
例如,你可以根据环境有条件地添加脚本或样式:
¥For example, you can conditionally add scripts or styles, depending on the environment:
.storybook/main.ts