mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 03:41:54 +08:00
35 lines
804 B
Plaintext
35 lines
804 B
Plaintext
```js
|
|
// MyComponent.stories.js | MyComponent.stories.jsx | MyComponent.stories.ts | MyComponent.stories.tsx
|
|
|
|
import { MyComponent } from './MyComponent';
|
|
|
|
export default {
|
|
component: MyComponent,
|
|
};
|
|
|
|
export const ExampleStory = {
|
|
args: {},
|
|
parameters: {
|
|
a11y: {
|
|
element: '#root',
|
|
config: {
|
|
rules: [
|
|
{
|
|
// The autocomplete rule will not run based on the CSS selector provided
|
|
id: 'autocomplete-valid',
|
|
selector: '*:not([autocomplete="nope"])',
|
|
},
|
|
{
|
|
// Setting the enabled option to false will disable checks for this particular rule on all stories.
|
|
id: 'image-alt',
|
|
enabled: false,
|
|
},
|
|
],
|
|
},
|
|
options: {},
|
|
manual: true,
|
|
},
|
|
},
|
|
};
|
|
```
|