mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 02:01:48 +08:00
21 lines
393 B
Plaintext
21 lines
393 B
Plaintext
```ts
|
|
// YourComponent.stories.ts
|
|
|
|
import YourComponent from './your-component.component';
|
|
|
|
export default {
|
|
title: 'YourComponent',
|
|
component: YourComponent,
|
|
};
|
|
|
|
const Template = (args: YourComponent) => ({
|
|
component: YourComponent,
|
|
props: args,
|
|
});
|
|
|
|
export const FirstStory = Template.bind({});
|
|
FirstStory.args = {
|
|
/* the args you need here will depend on your component */
|
|
};
|
|
```
|