mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
docs(recursive-list): update examples
This commit is contained in:
parent
242e2fcbdf
commit
d655296fcf
3 changed files with 15 additions and 15 deletions
|
@ -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}" />
|
||||
|
|
|
@ -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}" />
|
||||
|
|
|
@ -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}" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue