mapcomplete/UI/Base/MapControlButton.svelte

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
454 B
Svelte
Raw Normal View History

2023-03-24 19:21:15 +01:00
<script lang="ts">
import { createEventDispatcher } from "svelte"
import { twJoin } from "tailwind-merge"
2023-03-24 19:21:15 +01:00
/**
* A round button with an icon and possible a small text, which hovers above the map
*/
const dispatch = createEventDispatcher()
2023-05-30 02:52:22 +02:00
export let cls = ""
2023-03-24 19:21:15 +01:00
</script>
<button
on:click={(e) => dispatch("click", e)}
2023-06-15 16:12:46 +02:00
class={twJoin("pointer-events-auto m-0.5 h-fit w-fit rounded-full p-0.5 sm:p-1 md:m-1", cls)}
>
<slot />
</button>