mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 06:51:46 +08:00
- Newline following filename comment - Fix URLs in comments - Ensure consistent usage of `ts` vs `tsx` language
22 lines
385 B
Plaintext
22 lines
385 B
Plaintext
```js
|
|
// List.stories.js
|
|
|
|
import { html } from 'lit-html';
|
|
|
|
export default {
|
|
title: 'List',
|
|
component: 'demo-list',
|
|
subcomponents: { ListItem: 'demo-list-item' }, // 👈 Adds the ListItem component as a subcomponent
|
|
};
|
|
|
|
export const Empty = {};
|
|
|
|
export const OneItem = {
|
|
render: () => html`
|
|
<demo-list>
|
|
<demo-list-item></demo-list-item>
|
|
</demo-list>
|
|
`,
|
|
};
|
|
```
|