storybook/docs/snippets/solid/component-story-with-accessibility.js.mdx
2023-02-21 19:12:42 -05:00

33 lines
622 B
Plaintext

```js
// Button.stories.js|jsx
import { Button } from './Button';
export default {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/7.0/solid/configure/overview#configure-story-loading to learn how to generate automatic titles
*/
title: 'Accessibility testing',
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',
},
};
```