mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 02:01:48 +08:00
25 lines
466 B
Plaintext
25 lines
466 B
Plaintext
```js
|
|
// .storybook/preview.js
|
|
|
|
import * as React from 'react';
|
|
|
|
import { DocsContainer } from '@storybook/blocks';
|
|
|
|
const ExampleContainer = ({ children, ...props }) => {
|
|
return <DocsContainer {...props}>{children}</DocsContainer>;
|
|
};
|
|
|
|
export const parameters = {
|
|
actions: { argTypesRegex: '^on[A-Z].*' },
|
|
controls: {
|
|
matchers: {
|
|
color: /(background|color)$/i,
|
|
date: /Date$/,
|
|
},
|
|
},
|
|
docs: {
|
|
container: ExampleContainer,
|
|
},
|
|
};
|
|
```
|