Back to Storybook

refs

docs/api/main-config/main-config-refs.mdx

10.3.6876 B
Original Source

Parent: main.js|ts configuration

Type:

ts
{ [key: string]:
  | { title: string; url: string; expanded?: boolean, sourceUrl?: string }
  | (config: { title: string; url: string; expanded?: boolean, sourceUrl: string }) => { title: string; url: string; expanded?: boolean, sourceUrl?: string }
  | { disable: boolean }
}

Configures Storybook composition.

<CodeSnippets path="main-config-refs.md" />

Using a function

You can use a function to dynamically configure refs:

<CodeSnippets path="main-config-refs-with-function.md" />

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 path="main-config-refs-disable.md" />