diff --git a/MIGRATION.md b/MIGRATION.md index 632c065d1f7a..d116de268ec3 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -49,6 +49,7 @@ - [7.0 feature flags removed](#70-feature-flags-removed) - [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) - [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) @@ -1206,6 +1207,14 @@ export default { }; ``` +#### Dark mode detection + +Storybook 7 uses `prefers-color-scheme` to detects your system's dark mode preference if a theme is not set. + +Earlier versions used the light theme by default, so if you don't set a theme and your system's settings are in dark mode, this could surprise you. + +To learn more about theming, read our [documentation](https://storybook.js.org/docs/react/configure/theming). + ### 7.0 core addons changes #### Removed auto injection of @storybook/addon-actions decorator diff --git a/code/addons/essentials/src/index.ts b/code/addons/essentials/src/index.ts index 358cf796a579..b2d879c2d794 100644 --- a/code/addons/essentials/src/index.ts +++ b/code/addons/essentials/src/index.ts @@ -3,15 +3,55 @@ import { logger } from '@storybook/node-logger'; import { serverRequire } from '@storybook/core-common'; interface PresetOptions { + /** + * Allow to use @storybook/addon-actions + * @see https://storybook.js.org/addons/@storybook/addon-actions + * @default true + */ actions?: boolean; + /** + * Allow to use @storybook/addon-backgrounds + * @see https://storybook.js.org/addons/@storybook/addon-backgrounds + * @default true + */ backgrounds?: boolean; configDir: string; + /** + * Allow to use @storybook/addon-controls + * @see https://storybook.js.org/addons/@storybook/addon-controls + * @default true + */ controls?: boolean; + /** + * Allow to use @storybook/addon-docs + * @see https://storybook.js.org/addons/@storybook/addon-docs + * @default true + */ docs?: boolean; + /** + * Allow to use @storybook/addon-measure + * @see https://storybook.js.org/addons/@storybook/addon-measure + * @default true + */ measure?: boolean; + /** + * Allow to use @storybook/addon-outline + * @see https://storybook.js.org/addons/@storybook/addon-outline + * @default true + */ outline?: boolean; themes?: boolean; + /** + * Allow to use @storybook/addon-toolbars + * @see https://storybook.js.org/addons/@storybook/addon-toolbars + * @default true + */ toolbars?: boolean; + /** + * Allow to use @storybook/addon-viewport + * @see https://storybook.js.org/addons/@storybook/addon-viewport + * @default true + */ viewport?: boolean; }