mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 07:52:07 +08:00
29 lines
496 B
Plaintext
29 lines
496 B
Plaintext
```ts
|
|
// Page.stories.ts
|
|
|
|
import type { Meta, StoryObj } from '@storybook/web-components';
|
|
|
|
import { html } from 'lit';
|
|
|
|
type CustomArgs = { footer?: string };
|
|
|
|
const meta: Meta<CustomArgs> = {
|
|
title: 'Page',
|
|
component: 'demo-page',
|
|
render: ({ footer }) => html`
|
|
<demo-page>
|
|
<footer>${footer}</footer>
|
|
</demo-page>
|
|
`,
|
|
};
|
|
|
|
export default meta;
|
|
type Story = StoryObj<CustomArgs>;
|
|
|
|
export const CustomFooter: Story = {
|
|
args: {
|
|
footer: 'Built with Storybook',
|
|
},
|
|
};
|
|
```
|