Skip to content

Commit

Permalink
Pull addon-themes from essentials
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaun Lloyd committed Jul 28, 2023
1 parent dc9ac08 commit 55f5da3
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 29 deletions.
15 changes: 1 addition & 14 deletions code/addons/essentials/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,6 @@
"require": "./dist/outline/manager.js",
"import": "./dist/outline/manager.mjs"
},
"./themes/manager": {
"types": "./dist/themes/manager.d.ts",
"require": "./dist/themes/manager.js",
"import": "./dist/themes/manager.mjs"
},
"./themes/preview": {
"types": "./dist/themes/preview.d.ts",
"require": "./dist/themes/preview.js",
"import": "./dist/themes/preview.mjs"
},
"./toolbars/manager": {
"types": "./dist/toolbars/manager.d.ts",
"require": "./dist/toolbars/manager.js",
Expand Down Expand Up @@ -136,7 +126,6 @@
"@storybook/addon-highlight": "workspace:*",
"@storybook/addon-measure": "workspace:*",
"@storybook/addon-outline": "workspace:*",
"@storybook/addon-themes": "workspace:*",
"@storybook/addon-toolbars": "workspace:*",
"@storybook/addon-viewport": "workspace:*",
"@storybook/core-common": "workspace:*",
Expand Down Expand Up @@ -173,9 +162,7 @@
"./src/outline/preview.ts",
"./src/outline/manager.ts",
"./src/toolbars/manager.ts",
"./src/viewport/manager.ts",
"./src/themes/manager.ts",
"./src/themes/preview.ts"
"./src/viewport/manager.ts"
],
"platform": "node"
},
Expand Down
1 change: 0 additions & 1 deletion code/addons/essentials/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export function addons(options: PresetOptions) {
'measure',
'outline',
'highlight',
'themes',
]
.filter((key) => (options as any)[key] !== false)
.filter((addon) => !checkInstalled(addon, main))
Expand Down
1 change: 0 additions & 1 deletion code/addons/essentials/src/themes/manager.ts

This file was deleted.

2 changes: 0 additions & 2 deletions code/addons/essentials/src/themes/preview.ts

This file was deleted.

2 changes: 1 addition & 1 deletion code/addons/themes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Storybook Addon Themes can be used which between multiple themes for components

## Usage

Requires Storybook 7.0 or later. Themes is part of [essentials](https://storybook.js.org/docs/react/essentials/introduction) and so is installed in all new Storybooks by default. If you need to add it to your Storybook, you can run:
Requires Storybook 7.0 or later. If you need to add it to your Storybook, you can run:

```sh
npm i -D @storybook/addon-themes
Expand Down
2 changes: 1 addition & 1 deletion code/addons/themes/docs/getting-started/bootstrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 📦 Install addon

**NOTE:** As of Storybook 7.2, `@storybook/addon-themes` ships in `@storybook/addon-essentials`. If you're using Storybook >= 7.2, skip to ["Import Bootstrap"](#🥾-import-bootstrap).
<!-- **NOTE:** As of Storybook 7.2, `@storybook/addon-themes` ships in `@storybook/addon-essentials`. If you're using Storybook >= 7.2, skip to ["Import Bootstrap"](#🥾-import-bootstrap). -->

To get started, **install the package** as a dev dependency

Expand Down
2 changes: 1 addition & 1 deletion code/addons/themes/docs/getting-started/emotion.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 📦 Install addon

**NOTE:** As of Storybook 7.2, `@storybook/addon-themes` ships in `@storybook/addon-essentials`. If you're using Storybook >= 7.2, skip to ["Provide your themes"](#🎨-provide-your-themes).
<!-- **NOTE:** As of Storybook 7.2, `@storybook/addon-themes` ships in `@storybook/addon-essentials`. If you're using Storybook >= 7.2, skip to ["Provide your themes"](#🎨-provide-your-themes). -->

To get started, **install the package** as a dev dependency

Expand Down
2 changes: 1 addition & 1 deletion code/addons/themes/docs/getting-started/material-ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 📦 Install addon

**NOTE:** As of Storybook 7.2, `@storybook/addon-themes` ships in `@storybook/addon-essentials`. If you're using Storybook >= 7.2, skip to ["Import fonts"](#🔤-import-fonts).
<!-- **NOTE:** As of Storybook 7.2, `@storybook/addon-themes` ships in `@storybook/addon-essentials`. If you're using Storybook >= 7.2, skip to ["Import fonts"](#🔤-import-fonts). -->

To get started, **install the package** as a dev dependency

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 📦 Install addon

**NOTE:** As of Storybook 7.2, `@storybook/addon-themes` ships in `@storybook/addon-essentials`. If you're using Storybook >= 7.2, skip to ["Provide your themes"](#🎨-provide-your-themes).
<!-- **NOTE:** As of Storybook 7.2, `@storybook/addon-themes` ships in `@storybook/addon-essentials`. If you're using Storybook >= 7.2, skip to ["Provide your themes"](#🎨-provide-your-themes). -->

To get started, **install the package** as a dev dependency

Expand Down
2 changes: 1 addition & 1 deletion code/addons/themes/docs/getting-started/tailwind.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 📦 Install addon

**NOTE:** As of Storybook 7.2, `@storybook/addon-themes` ships in `@storybook/addon-essentials`. If you're using Storybook >= 7.2, skip to ["Import your css"](#🥾-import-your-css).
<!-- **NOTE:** As of Storybook 7.2, `@storybook/addon-themes` ships in `@storybook/addon-essentials`. If you're using Storybook >= 7.2, skip to ["Import your css"](#🥾-import-your-css). -->

To get started, **install the package** as a dev dependency

Expand Down
10 changes: 5 additions & 5 deletions docs/toc.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,11 @@ module.exports = {
title: 'Measure & Outline',
type: 'link',
},
{
pathSegment: 'themes',
title: 'Themes',
type: 'link',
},
// {
// pathSegment: 'themes',
// title: 'Themes',
// type: 'link',
// },
{
pathSegment: 'toolbars-and-globals',
title: 'Toolbars & globals',
Expand Down

0 comments on commit 55f5da3

Please sign in to comment.