Skip to content

Latest commit

 

History

History
58 lines (41 loc) · 1.21 KB

main-config-refs.md

File metadata and controls

58 lines (41 loc) · 1.21 KB
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', ]} />