mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 07:01:53 +08:00
28 lines
413 B
Plaintext
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',
|
|
},
|
|
};
|
|
```
|