storybook/docs/snippets/web-components/component-story-with-accessibility.js.mdx
2023-01-05 14:53:03 +00:00

28 lines
413 B
Plaintext

```js
// Button.stories.js
export default {
title: 'Accessibility testing',
component: 'custom-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',
},
};
```