storybook/docs/snippets/web-components/list-story-expanded.ts.mdx
2023-02-16 09:13:06 +08:00

38 lines
672 B
Plaintext

```ts
// List.stories.ts
import type { Meta, StoryObj } from '@storybook/web-components';
import { html } from 'lit';
const meta: Meta = {
title: 'List',
component: 'demo-list',
};
export default meta;
type Story = StoryObj;
export const Empty: Story = {
render: () => html`<demo-list></demo-list>`,
};
export const OneItem: Story = {
render: () => html`
<demo-list>
<demo-list-item></demo-list-item>
</demo-list>
`,
};
export const ManyItems: Story = {
render: () => html`
<demo-list>
<demo-list-item></demo-list-item>
<demo-list-item></demo-list-item>
<demo-list-item></demo-list-item>
</demo-list>
`,
};
```