1
0
mirror of https://github.com/garraflavatra/rolens.git synced 2025-07-15 04:44:05 +00:00

Drop collections

This commit is contained in:
2023-01-14 21:09:21 +01:00
parent 9662d46957
commit c81c5c9c73
6 changed files with 88 additions and 25 deletions

View File

@ -1,7 +1,6 @@
<script>
import { createEventDispatcher } from 'svelte';
export let items = undefined;
export let position = undefined;
@ -10,6 +9,11 @@
function close() {
dispatch('close');
}
function click(fn) {
fn();
close();
}
</script>
{#if items && position}
@ -20,7 +24,7 @@
<hr />
{:else}
<li>
<button class="item" on:click={item.fn}>
<button class="item" on:click={() => click(item.fn)}>
{item.label}
</button>
</li>