mastoradio/src/components/ContextMenu.svelte

16 lines
454 B
Svelte
Raw Normal View History

2020-02-22 03:50:37 +01:00
<button class="contextMenu__item" on:click={() => openShare()}>Share this song</button>
2020-02-22 01:59:26 +01:00
<a class="contextMenu__item" href="" target="_blank">Link to toot</a>
2020-02-22 03:50:37 +01:00
<a class="contextMenu__item" href="" target="_blank">Link to media</a>
<script>
import { onMount, getContext } from 'svelte';
import MicroModal from 'micromodal';
const closeMenu = getContext('closeMenu')
function openShare () {
MicroModal.show('share-modal')
closeMenu()
}
</script>