test(recursive-list): add types test

This commit is contained in:
Eric Y Liu 2021-07-03 04:06:43 -07:00
commit b74a7494b5
2 changed files with 35 additions and 1 deletions

View file

@ -1,4 +1,4 @@
<script> <script lang="ts">
import { ProgressBar } from "../types"; import { ProgressBar } from "../types";
</script> </script>

View 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}" />