Apply twJoin, twMerge

Looking at https://github.com/dcastil/tailwind-merge/blob/v1.13.1/docs/when-and-how-to-use-it.md#how-to-use-it I placed the "winning" class at the end for twMerge
This commit is contained in:
Tobias 2023-06-15 05:38:52 +02:00
parent 9c96f6534f
commit b55d976492
16 changed files with 52 additions and 43 deletions

View file

@ -1,5 +1,6 @@
<script lang="ts">
import { createEventDispatcher } from "svelte"
import { twJoin } from "tailwind-merge"
/**
* A round button with an icon and possible a small text, which hovers above the map
@ -10,7 +11,6 @@
<button
on:click={(e) => dispatch("click", e)}
class={"pointer-events-auto m-0.5 h-fit w-fit rounded-full p-0.5 sm:p-1 md:m-1 " + cls}
>
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>