storybook/docs/snippets/common/component-story-custom-source.js.mdx
2021-11-04 18:03:37 +00:00

27 lines
546 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,
};
export const Template = (args) => ({
//👇 Your template goes here
});
export const CustomSource = Template.bind({});
CustomSource.parameters = {
docs: {
source: {
code: 'Some custom string here',
},
},
};
```