mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 18:51:48 +08:00
22 lines
497 B
Plaintext
22 lines
497 B
Plaintext
```js
|
|
// YourComponent.stories.js | YourComponent.stories.ts
|
|
|
|
import { YourComponent } from './your-component';
|
|
|
|
export default {
|
|
component: YourComponent,
|
|
title: 'A complex case with a complex options object',
|
|
//👇 Creates specific argTypes with options
|
|
argTypes: {
|
|
someProp: {
|
|
control: {
|
|
type: 'select',
|
|
options: {
|
|
label1: { item1: true, item2: 1 },
|
|
'label 2 with spaces': { item1: false, item2: 3 },
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
``` |