storybook/docs/snippets/web-components/list-story-with-subcomponents.js.mdx
Kyle Gach b97d94e005 Address feedback
- Newline following filename comment
- Fix URLs in comments
- Ensure consistent usage of `ts` vs `tsx` language
2023-01-12 14:17:39 -07:00

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>
`,
};
```