storybook/docs/api/main-config-refs.md
Kyle Gach 1d3262ee62 Address comments:
- 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
2023-05-23 14:15:53 -06:00

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', ]} />