storybook/docs/snippets/common/component-story-custom-source.js.mdx
2022-04-29 20:37:36 +01:00

29 lines
584 B
Plaintext

```js
// Button.stories.js|jsx|ts|tsx
import { Button } from './Button';
export default {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
};
const Template = (args) => ({
//👇 Your template goes here
});
export const CustomSource = Template.bind({});
CustomSource.parameters = {
docs: {
source: {
code: 'Your code snippet goes here.',
language: "yml",
type: "auto",
},
},
};
```