storybook/docs/snippets/react/storybook-addon-a11y-disable.ts.mdx
Norbert de Langen c0240f8ec5
changes
2022-06-21 18:30:05 +02:00

28 lines
729 B
Plaintext

```ts
// MyComponent.stories.ts|tsx
import React from 'react';
import type { ComponentStoryFn, ComponentMeta } from '@storybook/react';
import { MyComponent } from './MyComponent';
export default {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Disable a11y addon',
component: MyComponent,
} as ComponentMeta<typeof MyComponent>;
const Template: ComponentStoryFn<typeof MyComponent> = () => <MyComponent />;
export const NonA11yStory = Template.bind({});
NonA11yStory.parameters = {
a11y: {
// This option disables all a11y checks on this story
disable: true,
},
};
```