mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 03:26:36 +00:00
test(recursive-list): add types test
This commit is contained in:
parent
0cc3ede6e4
commit
b74a7494b5
2 changed files with 35 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
<script>
|
||||
<script lang="ts">
|
||||
import { ProgressBar } from "../types";
|
||||
</script>
|
||||
|
||||
|
|
34
tests/RecursiveList.test.svelte
Normal file
34
tests/RecursiveList.test.svelte
Normal file
|
@ -0,0 +1,34 @@
|
|||
<script lang="ts">
|
||||
import { RecursiveList } from "../types";
|
||||
|
||||
const children = [
|
||||
{
|
||||
text: "Item 1",
|
||||
children: [
|
||||
{
|
||||
text: "Link",
|
||||
href: "/",
|
||||
children: [
|
||||
{
|
||||
html: "<h5>Hello world</h5>",
|
||||
children: [{ text: "Item 1a" }],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Item 2",
|
||||
children: [
|
||||
{
|
||||
text: "Item 2 content",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Item 3",
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
||||
<RecursiveList type="ordered" nested children="{children}" />
|
Loading…
Add table
Add a link
Reference in a new issue