anki/ts/editor-toolbar/DropdownMenu.svelte

15 lines
367 B
Svelte
Raw Normal View History

<script lang="typescript">
import type { SvelteComponentDefinition } from "./types";
2021-03-31 03:34:08 +02:00
export let id: string;
export let menuItems: SvelteComponentDefinition[];
</script>
2021-03-31 03:34:08 +02:00
<ul class="dropdown-menu" {id}>
{#each menuItems as menuItem}
<li>
<svelte:component this={menuItem.component} {...menuItem} />
2021-03-31 03:34:08 +02:00
</li>
{/each}
</ul>