mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 05:11:49 +08:00
- Add `babelDefault` and `managerHead` pages - Fix broken links - Clarify when some properties are primarily used by addon authors - Document simplified options for `babel`, `babelDefault`, `viteFinal`, and `webpackFinal` - Add description for `core.channelOptions` - Remove the `previewMainTemplate` page - Document possible shortcomings of some `stories` configurations - Document limitations of some `typescript` options
1.2 KiB
1.2 KiB
title |
---|
refs |
Parent: main.js|ts configuration
Type:
{ [key: string]:
| { title: string; url: string; expanded?: boolean }
| (config: { title: string; url: string; expanded?: boolean }) => { title: string; url: string; expanded?: boolean }
| { disable: boolean }
}
Configures Storybook composition.
<CodeSnippets paths={[ 'common/main-config-refs.js.mdx', 'common/main-config-refs.ts.mdx', ]} />
Using a function
You can use a function to dynamically configure refs:
<CodeSnippets paths={[ 'common/main-config-refs-with-function.js.mdx', 'common/main-config-refs-with-function.ts.mdx', ]} />
Disable a ref
Some package dependencies automatically compose their Storybook in yours. You can disable this behavior by setting disable
to true
for the package name:
<CodeSnippets paths={[ 'common/main-config-refs-disable.js.mdx', 'common/main-config-refs-disable.ts.mdx', ]} />