mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
32 lines
597 B
Svelte
32 lines
597 B
Svelte
<script lang="ts">
|
|
import { RecursiveList } from "carbon-components-svelte";
|
|
|
|
const children = [
|
|
{
|
|
text: "Item 1",
|
|
children: [
|
|
{
|
|
text: "Item 1a",
|
|
children: [{ html: "<h5>HTML content</h5>" }],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
text: "Item 2",
|
|
children: [
|
|
{
|
|
href: "https://svelte.dev/",
|
|
},
|
|
{
|
|
href: "https://svelte.dev/",
|
|
text: "Link with custom text",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
text: "Item 3",
|
|
},
|
|
];
|
|
</script>
|
|
|
|
<RecursiveList type="ordered" children="{children}" />
|