storybook/docs/snippets/common/component-story-with-accessibility.js.mdx
2021-10-26 18:51:33 +01:00

29 lines
417 B
Plaintext

```js
// Button.stories.js|jsx|ts|tsx
import { Button } from './Button';
export default {
component: Button,
argTypes: {
backgroundColor: { control: 'color' },
},
};
// This is an accessible story
export const Accessible = {
args: {
primary: false,
label: 'Button',
},
};
// This is not
export const Inaccessible = {
args: {
...Accessible.args,
backgroundColor: 'red',
},
};
```