storybook/docs/snippets/common/component-story-custom-args-complex-object.js.mdx
jonniebigodes b95d743cc8 Adjustments to controls and writing stories docs.
With snippets included
2021-03-02 22:30:46 +00:00

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 },
},
},
},
},
};
```