storybook/docs/snippets/common/storybook-addon-preset-example.js.mdx
2020-10-07 12:23:34 +08:00

20 lines
402 B
Plaintext

```js
// .storybook/my-addon/preset.js
export function config(entry = []) {
return [...entry, require.resolve('./defaultParameters')];
}
export function managerEntries(entries) {
return [...entries, require.resolve('./register')];
}
export const parameters = {
backgrounds: {
values: [
{ name: 'light', value: '#F8F8F8' },
{ name: 'dark', value: '#333333' },
],
},
};
```