storybook/docs/snippets/common/component-story-disable-controls-alt.mdx.mdx
2021-05-07 11:51:52 +08:00

24 lines
409 B
Plaintext

```md
<!--- YourComponent.stories.mdx -->
import { Meta,Story, Canvas } from '@storybook/addon-docs';
import { YourComponent } from './your-component'
<Meta
title='My Story'
argTypes={{
foo:{
control: false
}
}} />
export const Template = (args) => <YourComponent {...args} />
<Canvas>
<Story name="My Story" args={{ foo: 'bar'}}>
{Template.bind({})}
</Story>
</Canvas>
```