storybook/docs/api/main-config/main-config-features.mdx
2024-07-30 10:42:24 +02:00

73 lines
1.6 KiB
Plaintext

---
title: 'features'
sidebar:
order: 11
title: features
---
Parent: [main.js|ts configuration](./main-config.mdx)
Type:
```ts
{
argTypeTargetsV7?: boolean;
legacyDecoratorFileOrder?: boolean;
addonToolbarParameters?: boolean;
viewportStoryGlobals?: boolean;
backgroundsStoryGlobals?: boolean;
}
```
Enables Storybook's additional features.
## `legacyDecoratorFileOrder`
Type: `boolean`
Apply decorators from preview.js before decorators from addons or frameworks. [More information](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#changed-decorator-order-between-previewjs-and-addonsframeworks).
{/* prettier-ignore-start */}
<CodeSnippets path="main-config-features-legacy-decorator-file-order.md" />
{/* prettier-ignore-end */}
## `argTypeTargetsV7`
(⚠️ **Experimental**)
Type: `boolean`
Filter args with a "target" on the type from the render function.
{/* prettier-ignore-start */}
<CodeSnippets path="main-config-features-arg-type-targets-v7.md" />
{/* prettier-ignore-end */}
## `viewportStoryGlobals`
Type: `boolean`
Configures the [Viewports addon](../../essentials/viewports.mdx) to opt-in to the new story globals API for configuring viewports.
{/* prettier-ignore-start */}
<CodeSnippets path="main-config-features-viewport-story-globals.md" />
{/* prettier-ignore-end */}
## `backgroundsStoryGlobals`
Type: `boolean`
Configures the [Backgrounds addon](../../essentials/backgrounds.mdx) to opt-in to the new story globals API for configuring backgrounds.
{/* prettier-ignore-start */}
<CodeSnippets path="main-config-features-backgrounds-story-globals.md" />
{/* prettier-ignore-end */}