mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-04 20:11:07 +08:00
Essentials: Add addon-controls
This commit is contained in:
parent
f39cc687c4
commit
6810146f35
@ -10,6 +10,7 @@ Storybook essentials includes the following addons. Addons can be disabled and r
|
||||
|
||||
- [Actions](https://github.com/storybookjs/storybook/tree/next/addons/actions)
|
||||
- [Backgrounds](https://github.com/storybookjs/storybook/tree/next/addons/backgrounds)
|
||||
- [Controls](https://github.com/storybookjs/storybook/tree/next/addons/controls)
|
||||
- [Docs](https://github.com/storybookjs/storybook/tree/next/addons/docs)
|
||||
- [Viewport](https://github.com/storybookjs/storybook/tree/next/addons/viewport)
|
||||
|
||||
@ -50,4 +51,4 @@ module.exports = {
|
||||
};
|
||||
```
|
||||
|
||||
Valid addon keys include: `actions`, `backgrounds`, `docs`, `viewport`.
|
||||
Valid addon keys include: `actions`, `backgrounds`, `controls`, `docs`, `viewport`.
|
||||
|
@ -30,6 +30,7 @@
|
||||
"dependencies": {
|
||||
"@storybook/addon-actions": "6.0.0-beta.34",
|
||||
"@storybook/addon-backgrounds": "6.0.0-beta.34",
|
||||
"@storybook/addon-controls": "6.0.0-beta.34",
|
||||
"@storybook/addon-docs": "6.0.0-beta.34",
|
||||
"@storybook/addon-viewport": "6.0.0-beta.34",
|
||||
"@storybook/addons": "6.0.0-beta.34",
|
||||
|
@ -33,7 +33,7 @@ export function addons(options: PresetOptions = {}) {
|
||||
};
|
||||
|
||||
const main = requireMain(options.configDir);
|
||||
return ['actions', 'docs', 'backgrounds', 'viewport']
|
||||
return ['actions', 'docs', 'controls', 'backgrounds', 'viewport']
|
||||
.filter((key) => (options as any)[key] !== false)
|
||||
.map((key) => `@storybook/addon-${key}`)
|
||||
.filter((addon) => !checkInstalled(addon, main));
|
||||
|
Loading…
x
Reference in New Issue
Block a user