docs(recursive-list): update examples

This commit is contained in:
Eric Liu 2024-10-20 15:31:52 -07:00
commit d655296fcf
3 changed files with 15 additions and 15 deletions

View file

@ -1,19 +1,19 @@
<script>
import { RecursiveList } from "carbon-components-svelte";
const children = [
const nodes = [
{
text: "Item 1",
children: [
nodes: [
{
text: "Item 1a",
children: [{ html: "<h5>HTML content</h5>" }],
nodes: [{ html: "<h5>HTML content</h5>" }],
},
],
},
{
text: "Item 2",
children: [
nodes: [
{
href: "https://svelte.dev/",
},
@ -29,4 +29,4 @@
];
</script>
<RecursiveList children="{children}" />
<RecursiveList nodes="{nodes}" />

View file

@ -1,19 +1,19 @@
<script>
import { RecursiveList } from "carbon-components-svelte";
const children = [
const nodes = [
{
text: "Item 1",
children: [
nodes: [
{
text: "Item 1a",
children: [{ html: "<h5>HTML content</h5>" }],
nodes: [{ html: "<h5>HTML content</h5>" }],
},
],
},
{
text: "Item 2",
children: [
nodes: [
{
href: "https://svelte.dev/",
},
@ -29,4 +29,4 @@
];
</script>
<RecursiveList type="ordered" children="{children}" />
<RecursiveList type="ordered" nodes="{nodes}" />

View file

@ -1,19 +1,19 @@
<script>
import { RecursiveList } from "carbon-components-svelte";
const children = [
const nodes = [
{
text: "Item 1",
children: [
nodes: [
{
text: "Item 1a",
children: [{ html: "<h5>HTML content</h5>" }],
nodes: [{ html: "<h5>HTML content</h5>" }],
},
],
},
{
text: "Item 2",
children: [
nodes: [
{
href: "https://svelte.dev/",
},
@ -29,4 +29,4 @@
];
</script>
<RecursiveList type="ordered-native" children="{children}" />
<RecursiveList type="ordered-native" nodes="{nodes}" />