Skip to content

Commit

Permalink
Add migration note about addons.setConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
kylegach committed Feb 15, 2024
1 parent 4664dc1 commit 2c0ba07
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
- [Story context is prepared before for supporting fine grained updates](#story-context-is-prepared-before-for-supporting-fine-grained-updates)
- [Changed decorator order between preview.js and addons/frameworks](#changed-decorator-order-between-previewjs-and-addonsframeworks)
- [Dark mode detection](#dark-mode-detection)
- [`addons.setConfig` should now be imported from `@storybook/manager-api`.](#addonssetconfig-should-now-be-imported-from-storybookmanager-api)
- [7.0 core addons changes](#70-core-addons-changes)
- [Removed auto injection of @storybook/addon-actions decorator](#removed-auto-injection-of-storybookaddon-actions-decorator)
- [Addon-backgrounds: Removed deprecated grid parameter](#addon-backgrounds-removed-deprecated-grid-parameter)
Expand Down Expand Up @@ -468,7 +469,10 @@ In Storybook 7, these packages existed for backwards compatibility, but were mar
- `@storybook/store` - this package has been merged into `@storybook/preview-api`.
- `@storybook/api` - this package has been replaced with `@storybook/manager-api`.

This section explains the rationale, and the required changed you might have to make: [New Addons API](#new-addons-api)
These sections explain the rationale, and the required changes you might have to make:

- [New Addons API](#new-addons-api)
- [`addons.setConfig` should now be imported from `@storybook/manager-api`.](#addonssetconfig-should-now-be-imported-from-storybookmanager-api)

### Framework-specific Vite plugins have to be explicitly added

Expand Down Expand Up @@ -2029,6 +2033,19 @@ Earlier versions used the light theme by default, so if you don't set a theme an

To learn more about theming, read our [documentation](https://storybook.js.org/docs/react/configure/theming).

#### `addons.setConfig` should now be imported from `@storybook/manager-api`.

The previous package, `@storybook/addons`, is now deprecated and will be removed in 8.0.

```diff
- import { addons } from '@storybook/addons';
+ import { addons } from '@storybook/manager-api';

addons.setConfig({
// ...
})
```

### 7.0 core addons changes

#### Removed auto injection of @storybook/addon-actions decorator
Expand Down

0 comments on commit 2c0ba07

Please sign in to comment.